From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 'Bastian Beischer' <beischer@physik.rwth-aachen.de>, Emacs-devel@gnu.org
Subject: Re: font-lock-refresh-defaults
Date: Thu, 22 Jul 2010 16:46:14 +0200 [thread overview]
Message-ID: <jwvsk3bshk0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4FF5DD848A9B404E98F26FF04C85B3FA@us.oracle.com> (Drew Adams's message of "Thu, 15 Jul 2010 14:20:34 -0700")
> (defun Buffer-menu-fontify-and-adjust-frame ()
> "Use for `buffer-menu-mode-hook'. Fontify, fit and raise frame."
> (save-window-excursion
> (save-excursion
> (pop-to-buffer "*Buffer List*")
> (when (< emacs-major-version 21)
> (make-local-variable 'font-lock-defaults))
> (setq font-lock-defaults
> '(buffer-menu-font-lock-keywords t))
> (when (fboundp 'font-lock-refresh-defaults)
> (font-lock-refresh-defaults)) ; WHY NEEDED NOW?
> (turn-on-font-lock)
> (when (and (fboundp 'fit-frame) (one-window-p t))
> (fit-frame))
> (raise-frame))))
> OK, so Emacs has apparently changed something about font-locking, so
> now you must refresh whenever you change the font-lock defaults.
> (Whenever? Or maybe only sometimes when you change the defaults?)
I think that's pretty much always been necessary (as a general rule),
tho if the change is made before font-lock gets initialized, then of
course, there's nothing to refresh and the refresh is not needed, but
"when font-lock is initialized" is something that can depend on
*many* things.
Stefan
next prev parent reply other threads:[~2010-07-22 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 21:20 font-lock-refresh-defaults Drew Adams
2010-07-22 14:46 ` Stefan Monnier [this message]
2010-07-22 15:48 ` font-lock-refresh-defaults Drew Adams
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=jwvsk3bshk0.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=Emacs-devel@gnu.org \
--cc=beischer@physik.rwth-aachen.de \
--cc=drew.adams@oracle.com \
/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).