GNU bug report logs -
#9919
24.0.91; font-lock broken in dired
Previous Next
Full log
Message #11 received at 9919 <at> debbugs.gnu.org (full text, mbox):
> If this user-visible change is intended, then please (a)
> update the doc to explain it, and (b) mention the change in NEWS.
Whatever the motivation behind this change (assuming it was intentional), the
effect is that font-locking now gets done _twice_ when someone modifies
`font-lock-defaults', because of the need to call `font-lock-refresh-defaults'.
In my case, this happens each time a Dired buffer is visited. (Likewise buffer
menu and finder and...)
This is a waste of time. It should be possible to simply update
`font-lock-defaults' (e.g. in a mode hook) and have font-locking be done only
once, using the updated defaults. Why impose double font-locking? Why should
any initial font-locking with the wrong defaults followed by "refreshing" to the
right ones be needed? This apparently was not needed in the past.
It was such a simple idiom:
(set (make-local-variable 'font-lock-defaults)
'(nil t nil nil nil
(font-lock-fontify-region-function .
browse-kill-ring-fontify-region)))
(setq font-lock-defaults '(buffer-menu-font-lock-keywords t))
(setq font-lock-defaults '(finder-font-lock-keywords nil nil
(("+-*/.<>=!?$%_&~^:@" . "w")) nil))
(set (make-local-variable 'font-lock-defaults)
'(compilation-mode-font-lock-keywords t))
...
On n'arrete pas le progres...
This bug report was last modified 13 years and 134 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.