From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: font-lock-refresh-defaults Date: Thu, 22 Jul 2010 16:46:14 +0200 Message-ID: References: <4FF5DD848A9B404E98F26FF04C85B3FA@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1279809990 10259 80.91.229.12 (22 Jul 2010 14:46:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Jul 2010 14:46:30 +0000 (UTC) Cc: 'Bastian Beischer' , Emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 22 16:46:29 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Obx2a-00025G-Ka for ged-emacs-devel@m.gmane.org; Thu, 22 Jul 2010 16:46:28 +0200 Original-Received: from localhost ([127.0.0.1]:49271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Obx2Z-0003Tr-Qc for ged-emacs-devel@m.gmane.org; Thu, 22 Jul 2010 10:46:27 -0400 Original-Received: from [140.186.70.92] (port=55278 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Obx2T-0003T1-Nq for Emacs-devel@gnu.org; Thu, 22 Jul 2010 10:46:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Obx2S-0005AX-Gf for Emacs-devel@gnu.org; Thu, 22 Jul 2010 10:46:21 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41759) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Obx2S-00059z-E1 for Emacs-devel@gnu.org; Thu, 22 Jul 2010 10:46:20 -0400 Original-Received: from ceviche.home (vpn-132-204-232-131.acd.umontreal.ca [132.204.232.131]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6MEkFJO023624; Thu, 22 Jul 2010 10:46:16 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 88ED3660D2; Thu, 22 Jul 2010 16:46:14 +0200 (CEST) In-Reply-To: <4FF5DD848A9B404E98F26FF04C85B3FA@us.oracle.com> (Drew Adams's message of "Thu, 15 Jul 2010 14:20:34 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Level: X-NAI-Spam-Score: 0.7 X-NAI-Spam-Rules: 2 Rules triggered SUBJ_HAS_UNIQ_ID=0.7, RV3583=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127640 Archived-At: > (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