[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#6662: closed (24.0.50; no explanation of new featu

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#6662: closed (24.0.50; no explanation of new feature requiring font-lock changes)
Date: Tue, 10 Jan 2012 03:15:03 +0000

Your message dated Mon, 09 Jan 2012 22:14:37 -0500
with message-id <address@hidden>
and subject line Re: bug#9919: 24.0.91; font-lock broken in dired
has caused the debbugs.gnu.org bug report #9919,
regarding 24.0.50; no explanation of new feature requiring font-lock changes
to be marked as done.

(If you believe you have received this mail in error, please contact

9919: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9919
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; no explanation of new feature requiring font-lock changes Date: Sat, 17 Jul 2010 13:35:43 -0700
Sent this to emacs-devel but got no response.  At a minimum there is a
doc bug (e.g. NEWS).  This new feature can require user code changes.
I just got a bug report for my library buff-menu+.el, which adds a few things to
buff-menu.el. The problem was that none of the faces were showing up (except
one), using the latest Emacs source code.
There is no such problem with Emacs 23.2 or with a build as late as 2009-09-11.
I see the problem starting with a build of 2010-05-23 (I have no builds between
those dates).
The buff-menu.el source library is identical (no changes), so the problem does
not come from that code.
The problem goes away if a call to `font-lock-refresh-defaults' is inserted:
(defun Buffer-menu-fontify-and-adjust-frame ()
  "Use for `buffer-menu-mode-hook'.  Fontify, fit and raise frame."
      (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?
      (when (and (fboundp 'fit-frame) (one-window-p t))
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?)
Why?  And exactly when?  What changes must users make to their code?
Well, the doc string for the function gives a little guidance, but I looked in
the Emacs and Elisp manuals for more.  Nothing.  I looked in NEWS.  Nothing.
Why the silence about this change?  Why not help users by telling them (a) THAT
they may have to do something different to get the same behavior as before and
(b) WHY they now have to do something different.
Why no discussion in emacs-devel before the change - or even after it?
Searching the emacs-devel archives finds thread "Need help with search based
font-locking".  This function was added in the middle of that thread.  No
attention was brought to this change.  Nothing about how this means that you
might need to change your code, that this represents a general font-lock
behavior change.
Isn't some explanation of this feature the least one could expect from those who
make such changes?  We might like to understand WHY such a change in existing
code that uses font-locking is now necessary, and under what circumstances.

In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2010-07-12 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'

--- End Message ---
--- Begin Message --- Subject: Re: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 09 Jan 2012 22:14:37 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)
tags 9919 notabug

>> > That does not happen in Emacs 20-22 AFAICT.
>> > What's the gotcha for Emacs 20-22?  What does a user need to
>> > do in Emacs 20-22 to show that this code won't DTRT?
>> AFAIK the example will break your code in any version of Emacs
>> that supports font-lock.
> Nope, not the recipe you gave, at least.  Try it.
> That's why I asked (still asking).

Don't know, then, there must be something else at play.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]