GNU bug report logs - #6662
24.0.50; no explanation of new feature requiring font-lock changes

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 17 Jul 2010 20:42:02 UTC

Severity: normal

Tags: notabug

Merged with 9919

Found in versions 24.0.50, 24.0.91

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg01057.html

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6662 in the body.
You can then email your comments to 6662 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6662; Package emacs. (Sat, 17 Jul 2010 20:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 17 Jul 2010 20:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
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."
  (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?)
 
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 24.0.50.1 (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'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6662; Package emacs. (Mon, 31 Oct 2011 22:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 6662 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <6662 <at> debbugs.gnu.org>
Subject: RE: bug#6662: 24.0.50;
	no explanation of new feature requiring font-lock changes
Date: Mon, 31 Oct 2011 15:08:57 -0700
Ping.  And see the apparently related bug #9919.





Merged 6662 9919. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 17 Nov 2011 02:52:02 GMT) Full text and rfc822 format available.

Set bug forwarded-to-address to 'http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg01057.html'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 17 Nov 2011 02:54:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6662; Package emacs. (Fri, 06 Jan 2012 17:19:01 GMT) Full text and rfc822 format available.

Message #15 received at 6662 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <6662 <at> debbugs.gnu.org>
Subject: RE: bug#6662: 24.0.50;
	no explanation of new feature requiring font-lock changes
Date: Fri, 6 Jan 2012 09:14:19 -0800
ping.

This bug involves double font-locking, a waste of time.

It is a regression, breaking the behavior available in all previous releases.
See the thread for bug #9919 for when this regression was introduced.

> Sent: Monday, October 31, 2011 3:09 PM
>
> Ping.  And see the apparently related bug #9919.





Added tag(s) notabug. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Tue, 10 Jan 2012 03:15:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Feb 2012 12:24:03 GMT) Full text and rfc822 format available.

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.