GNU bug report logs - #13817
24.3.50; Disabling whitespace-mode that was enabled in sgml-mode-hook breaks font-lock

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 26 Feb 2013 06:32:01 UTC

Severity: normal

Found in version 24.3.50

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 13817-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13817-done <at> debbugs.gnu.org
Subject: Re: bug#13817: 24.3.50;
	Disabling whitespace-mode that was enabled in sgml-mode-hook breaks
	font-lock
Date: Tue, 19 Mar 2013 09:02:34 -0400
>>> 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.


        Stefan




This bug report was last modified 12 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.