From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work. Date: Sat, 18 Jun 2016 12:56:10 +0300 Message-ID: <83ziqiakhx.fsf@gnu.org> References: <20160617102500.GA3316@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466243788 30268 80.91.229.3 (18 Jun 2016 09:56:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jun 2016 09:56:28 +0000 (UTC) Cc: 23783-done@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 18 11:56:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bECz8-00037o-9O for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jun 2016 11:56:14 +0200 Original-Received: from localhost ([::1]:34112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bECz7-0007Cf-E0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jun 2016 05:56:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bECz0-0007BV-23 for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 05:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bECyw-0003My-BI for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 05:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bECyw-0003Mm-7i for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 05:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bECyw-0002Gz-2h for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 05:56:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 09:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 23783 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 23783@debbugs.gnu.org, eliz@gnu.org, acm@muc.de Original-Received: via spool by 23783-done@debbugs.gnu.org id=D23783.14662437188678 (code D ref 23783); Sat, 18 Jun 2016 09:56:01 +0000 Original-Received: (at 23783-done) by debbugs.gnu.org; 18 Jun 2016 09:55:18 +0000 Original-Received: from localhost ([127.0.0.1]:44803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bECyE-0002Ft-Ez for submit@debbugs.gnu.org; Sat, 18 Jun 2016 05:55:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bECyD-0002Ff-3e for 23783-done@debbugs.gnu.org; Sat, 18 Jun 2016 05:55:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bECy4-00036X-EL for 23783-done@debbugs.gnu.org; Sat, 18 Jun 2016 05:55:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bECy4-00036G-B2; Sat, 18 Jun 2016 05:55:08 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1342 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bECy3-0000c8-4b; Sat, 18 Jun 2016 05:55:07 -0400 In-reply-to: <20160617102500.GA3316@acm.fritz.box> (message from Alan Mackenzie on Fri, 17 Jun 2016 10:25:00 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119724 Archived-At: > Date: Fri, 17 Jun 2016 10:25:00 +0000 > From: Alan Mackenzie > > 1. emacs -Q > 2. M-x customize-variable font-lock-maximum-decoration > o - set the level to 1 (minimum decoration) and apply the new > setting. > 3. C-x C-f .../src/xdisp.c > 4. Note that font locking is indeed at level 1. Note, indeed, how fast > scrolling works. ;-) > 5. M-x customize-variable font-lock-maximum-decoration > o - set the level to t (maximum decoration) and apply. > 6. (In the xdisp.c window) M-x font-lock-mode, twice. > 7. Note that the font locking remains at level 1. > > This last is surely a bug. Enabling font locking in a buffer should use > the current valid setting of font-lock-maximum-decoration. It's quite clear from the code that this is the intended behavior. The comments for font-lock-set-defaults (the function and the variable) and for font-lock-refresh-defaults are especially revealing. > There are no instructions in the Emacs manual which tell you how to > change decoration levels. It merely states on page "Font Lock Mode" > that "You can customize the variable `font-lock-maximum-decoration' to > alter the amount of fontification applied by Font Lock mode, for major > modes that support this feature.". This doesn't then say what is to be > done after doing such customization, for it to take effect. > > There is a non-interactive function `font-lock-refresh-defaults' which > works, but this function isn't called from anywhere in Emacs. I have added to the Emacs manual explanation of how to make the customization of font-lock-maximum-decoration effective in a file buffer. In a nutshell, you need to either customize before visiting the file, or kill the buffer and revisit the file after the customization. I think this fixes this bug, so I'm closing it. Thanks.