From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#6662: 24.0.50; no explanation of new feature requiring font-lock changes Date: Sat, 17 Jul 2010 13:35:43 -0700 Message-ID: <9C336195BCF841959BA6E1D0B6858CEA@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1279400446 3146 80.91.229.12 (17 Jul 2010 21:00:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 17 Jul 2010 21:00:46 +0000 (UTC) To: 6662@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 17 23:00:44 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1OaEV1-0003i2-Oa for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jul 2010 23:00:44 +0200 Original-Received: from localhost ([127.0.0.1]:55010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaEV0-0005ia-UA for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jul 2010 17:00:42 -0400 Original-Received: from [140.186.70.92] (port=57623 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaEUr-0005g1-JA for bug-gnu-emacs@gnu.org; Sat, 17 Jul 2010 17:00:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OaEUq-00046z-5x for bug-gnu-emacs@gnu.org; Sat, 17 Jul 2010 17:00:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47872) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaEUq-00046u-3N for bug-gnu-emacs@gnu.org; Sat, 17 Jul 2010 17:00:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OaECw-0004H5-Lq; Sat, 17 Jul 2010 16:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jul 2010 20:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6662 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.127939930016422 (code B ref -1); Sat, 17 Jul 2010 20:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jul 2010 20:41:40 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaECZ-0004Gp-Jj for submit@debbugs.gnu.org; Sat, 17 Jul 2010 16:41:39 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaEAg-0004Fu-69 for submit@debbugs.gnu.org; Sat, 17 Jul 2010 16:41:38 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:47258) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OaEAQ-0001pV-0I for submit@debbugs.gnu.org; Sat, 17 Jul 2010 16:39:26 -0400 Original-Received: from [140.186.70.92] (port=38162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaE9q-0008KS-9J for bug-gnu-emacs@gnu.org; Sat, 17 Jul 2010 16:39:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OaE87-00012o-1E for bug-gnu-emacs@gnu.org; Sat, 17 Jul 2010 16:37:04 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:18600) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaE86-00012k-PD for bug-gnu-emacs@gnu.org; Sat, 17 Jul 2010 16:37:03 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o6HKb03c018356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 17 Jul 2010 20:37:02 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o6HKYqV7010189 for ; Sat, 17 Jul 2010 20:36:59 GMT Original-Received: from abhmt010.oracle.com by acsmt354.oracle.com with ESMTP id 435221951279398938; Sat, 17 Jul 2010 13:35:38 -0700 Original-Received: from dradamslap1 (/141.144.80.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 17 Jul 2010 13:35:38 -0700 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Thread-Index: Acsl76DjO5RKph8BSv6IYoLmyDVcPw== X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4C42146C.026B:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 17 Jul 2010 16:42:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38641 Archived-At: 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'