bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33887: 26.1; Emacs hangs for several seconds when going to the end o


From: Noam Postavsky
Subject: bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode
Date: Mon, 27 May 2019 08:02:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Vincent Lefevre <vincent@vinc17.net> 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)))

Attachment: 0001-Don-t-fontify-text-outside-of-SGML-XML-tags-Bug-3388.patch
Description: patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]