From: "Drew Adams" <drew.adams@oracle.com>
To: <9919@debbugs.gnu.org>
Subject: bug#9919: 24.0.91; font-lock broken in dired
Date: Mon, 31 Oct 2011 15:29:05 -0700 [thread overview]
Message-ID: <14743DC722C642EC9D87D0FAA95ECD27@us.oracle.com> (raw)
In-Reply-To: <02C44A1DAC5C497CAD108EF825D585A8@us.oracle.com>
> 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...
next prev parent reply other threads:[~2011-10-31 22:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 15:11 bug#9919: 24.0.91; font-lock broken in dired Drew Adams
2011-10-31 22:06 ` Drew Adams
2011-10-31 22:29 ` Drew Adams [this message]
2011-11-05 1:34 ` Christoph Scholtes
2011-11-05 15:30 ` Drew Adams
2012-01-09 15:52 ` Drew Adams
2012-01-09 17:04 ` Stefan Monnier
2012-01-09 18:59 ` Drew Adams
2012-01-09 22:36 ` Stefan Monnier
2012-01-10 0:04 ` Drew Adams
2012-01-10 1:26 ` Stefan Monnier
2012-01-10 1:35 ` Drew Adams
2012-01-10 3:14 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14743DC722C642EC9D87D0FAA95ECD27@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=9919@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).