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

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

bug#13817: 24.3.50; Disabling whitespace-mode that was enabled in sgml-m


From: Dmitry Gutov
Subject: bug#13817: 24.3.50; Disabling whitespace-mode that was enabled in sgml-mode-hook breaks font-lock
Date: Tue, 19 Mar 2013 19:14:15 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

On 19.03.2013 17:02, Stefan Monnier wrote:
On the surface, the reason for this is that when whitespace-mode is being
turned on in the hook, font-lock-keywords is still nil, and so nil is
saved in whitespace-font-lock-keywords.
whitespace.el should probably use font-lock-remove-keywords instead.
That helped, thank you.
I left the disabling/enabling of font-lock-mode there, because otherwise the
changes in highlighting are not visible until the buffer is modified.

Supposedly `font-lock-fontify-buffer' is meant to do that without
disabling+enabling.

That works, too. :)





reply via email to

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