Only fontify syntactically when the text is not considered fontified

Text may not have a `font-lock-face` property, but may be
marked fontified if it has a non-nil `font-lock-fontified` property.
This commit is contained in:
Nathaniel Nicandro 2018-10-06 14:06:39 -05:00
parent 52a44b7e30
commit abdf63a517

View file

@ -2364,11 +2364,9 @@ When the kernel restarts, insert a new prompt."
(append vars
(list
(cons 'font-lock-syntactic-face-function
;; Only fontify syntactically when the text
;; does not have a font-lock-face property
(lambda (state)
(unless (get-text-property
(nth 8 state) 'font-lock-face)
(nth 8 state) 'font-lock-fontified)
(when sff (funcall sff state))))))))
syntax-propertize-function spf))
(font-lock-mode)))