From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#1534: Font lock decoration levels mismatch? Date: Fri, 12 Dec 2008 15:34:33 -0500 Message-ID: <4xoczhuo86.fsf@fencepost.gnu.org> References: <1228938693.24919.50.camel@eep> <1229107734.29413.18.camel@eep> Reply-To: Glenn Morris , 1534@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229114685 13457 80.91.229.12 (12 Dec 2008 20:44:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2008 20:44:45 +0000 (UTC) Cc: 1534@emacsbugs.donarmstrong.com To: Derick Eddington Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 12 21:45:48 2008 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.50) id 1LBEtK-00008y-Fm for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Dec 2008 21:45:43 +0100 Original-Received: from localhost ([127.0.0.1]:46880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBEs8-0001Cs-Ob for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Dec 2008 15:44:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBEs3-000186-4S for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 15:44:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBEs1-00013i-9K for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 15:44:22 -0500 Original-Received: from [199.232.76.173] (port=42923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBEs1-00013P-4X for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 15:44:21 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34867) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBEs0-0003Cl-HZ for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 15:44:20 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBCKiIxh000410; Fri, 12 Dec 2008 12:44:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBCKe4l1031669; Fri, 12 Dec 2008 12:40:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Glenn Morris Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 12 Dec 2008 20:40:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1534 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1534-submit@emacsbugs.donarmstrong.com id=B1534.122911411731065 (code B ref 1534); Fri, 12 Dec 2008 20:40:04 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 31; hammy, 124; neutral, 64; spammy, 0. spammytokens: hammytokens:0.000-+--H*M:fsf, 0.000-+--H*UA:Emacs, 0.000-+--H*u:Emacs, 0.000-+--H*MI:fsf, 0.000-+--H*UA:Gnus Original-Received: (at 1534) by emacsbugs.donarmstrong.com; 12 Dec 2008 20:35:17 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBCKZDPH030917 for <1534@emacsbugs.donarmstrong.com>; Fri, 12 Dec 2008 12:35:14 -0800 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LBEiX-00031F-Fu; Fri, 12 Dec 2008 15:34:33 -0500 X-Spook: enemy of the state MIT-LL SCUD missile Panama BROMURE X-Ran: 43ok90?Y"$59`Nv1VG3$& (Derick Eddington's message of "Fri, 12 Dec 2008 10:48:54 -0800") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 12 Dec 2008 15:44:22 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:23252 Archived-At: Derick Eddington wrote: >> > when I customize the level for a specific mode (one I'm still >> > developing) the number given to Customize is 0-based not 1-based; >> > i.e., my `font-lock-defaults' `KEYWORDS' member is like `(level-1 >> > level-2 level-3 level-4)' and, e.g., to make Customize use >> > level-3 I have to tell it the number 2. [...] > I'm customizing `font-lock-maximum-decoration'. It's documentation says: [...] > ((c-mode . t) (c++-mode . 2) (t . 1)) > means use the maximum decoration available for buffers in C > mode, level 2 decoration for buffers in C++ mode, and level 1 > decoration otherwise. [...] > When I start customizing it from its default state and activate the > "Value Menu" with "mode specific", I get: > > INS DEL Instance: > Mode: > (*) all > ( ) name: nil > Decoration: > ( ) default > (*) maximum > ( ) level: 1 OK. So where's the part where you have to say 2 in order to get 3? If I use customize to say: mode: all : maximum mode: name : f90-mode : level 2 Then I get level 2 highlighting in F90 buffers. Oh, perhaps I see the problem. You said: my `font-lock-defaults' `KEYWORDS' member is like `(level-1 level-2 level-3 level-4)' There should be a separate element at the start giving the default highlighting for the mode. See for example f90-mode: (set (make-local-variable 'font-lock-defaults) '((f90-font-lock-keywords f90-font-lock-keywords-1 f90-font-lock-keywords-2 f90-font-lock-keywords-3 f90-font-lock-keywords-4) nil t)) (or grep for "keywords-1" in the lisp sources) That does indeed look like a documentation bug in the manual...