* font-lock and mode changes.
@ 2002-08-11 23:52 Luc Teirlinck
2002-08-13 1:48 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Luc Teirlinck @ 2002-08-11 23:52 UTC (permalink / raw)
Take some font-lock fontified buffer and put it in a mode that does
not support font-lock, say fundamental-mode. The fontification stays.
This is highly inappropriate, because it no longer gets properly
updated and pretty soon the fontification gets funny. Rear stickiness
makes things worse.
It seems the following or some variant of it would solve the problem:
(defun font-lock-mode-cmmh ()
(if font-lock-mode (font-lock-unfontify-buffer)))
(add-hook 'change-major-mode-hook 'font-lock-mode-cmmh)
The "if font-lock-mode" is important, because if font-lock-mode is not
enabled, then we not only do not want to waste CPU, but more
importantly, we do not want to erase user-defined and possibly
mode-independent fontification.
I am using Emacs 21.2.90.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: font-lock and mode changes.
2002-08-11 23:52 font-lock and mode changes Luc Teirlinck
@ 2002-08-13 1:48 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2002-08-13 1:48 UTC (permalink / raw)
Cc: emacs-devel
I fixed this -- thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-13 1:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-11 23:52 font-lock and mode changes Luc Teirlinck
2002-08-13 1:48 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.