Vincent Lefevre writes: > On 2019-05-26 18:17:55 -0400, Noam Postavsky wrote: >> And about the highlighting of quoted text outside tags, we can just >> disable fontification, while leaving the syntax code untouched: > [...] > > I've applied it with a minor change against Emacs 26 (context lines > for hunk #1 of sgml-mode.el are different), but the comments are > no longer highlighted as comments. Ah, I guess reusing the default font-lock-syntactic-face-function doesn't really make sense after all. So sgml-font-lock-syntactic-face should be like this: (defun sgml-font-lock-syntactic-face (state) "`font-lock-syntactic-face-function' for `sgml-mode'." ;; Don't use string face outside of tags. (cond ((and (nth 9 state) (nth 3 state)) font-lock-string-face) ((nth 4 state) font-lock-comment-face)))