From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Derick Eddington Newsgroups: gmane.emacs.bugs Subject: bug#1534: Font lock decoration levels mismatch? Date: Fri, 12 Dec 2008 10:48:54 -0800 Message-ID: <1229107734.29413.18.camel@eep> References: <1228938693.24919.50.camel@eep> Reply-To: Derick Eddington , 1534@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229108694 26131 80.91.229.12 (12 Dec 2008 19:04:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2008 19:04:54 +0000 (UTC) Cc: 1534@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 12 20:05:57 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 1LBDKg-0000Wh-1z for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Dec 2008 20:05:51 +0100 Original-Received: from localhost ([127.0.0.1]:34302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBDJU-0004fM-Ls for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Dec 2008 14:04:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBDJI-0004Yh-Gp for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 14:04:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBDJG-0004XK-BI for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 14:04:23 -0500 Original-Received: from [199.232.76.173] (port=33082 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBDJG-0004X6-2f for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 14:04:22 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41309) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBDJF-0007Cr-CU for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 14:04:21 -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 mBCJ4Ia0003704; Fri, 12 Dec 2008 11:04:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBCIt4aQ000988; Fri, 12 Dec 2008 10:55:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Derick Eddington Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 12 Dec 2008 18:55: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.122910774631913 (code B ref 1534); Fri, 12 Dec 2008 18:55:04 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 43; hammy, 149; neutral, 118; spammy, 2. spammytokens:0.987-1--ins, 0.959-+--association hammytokens:0.000-+--emacs, 0.000-+--Emacs, 0.000-+--nil, 0.000-+--Lisp, 0.000-+--buffers Original-Received: (at 1534) by emacsbugs.donarmstrong.com; 12 Dec 2008 18:49:06 +0000 Original-Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBCIn36a031907 for <1534@emacsbugs.donarmstrong.com>; Fri, 12 Dec 2008 10:49:04 -0800 Original-Received: by rv-out-0506.google.com with SMTP id k40so1501212rvb.1 for <1534@emacsbugs.donarmstrong.com>; Fri, 12 Dec 2008 10:49:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=KBxx37kXwd5c2I9+rOmW6BqHHkqyHIBbYTD3Uoci5Kc=; b=JMeM7QkGLmGVBfQj1Hb3dUzr98gnAlyeptpYgaJuBCUetPhiXDBBfm5cxzmD89k2NO ygav29GpwPHvIV1hnPvX5Kk6bpmnIZYpNjNIKNFTEoOXqYIABTvo/87hGssYfv0fqjYw 2gztCDX6S+1cFT9Q94HG0zmbLTcugn85aj1uU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=EzOGfhM0y5RjRABmxCNd6OCnuEP0fI5iPH6E90WOCOjg0J837Mlv35Te1KRs5QCDQh BX7wUd8WtDxYG8oB/96r+rW8N2e5tdQACHD5Y0Ik+Z/9VCpKv8EO6/t+2b51+giq7sHq ajFK1f2rNUMEn967mxO9PXVefW7PILRR6SfbI= Original-Received: by 10.141.29.20 with SMTP id g20mr2057917rvj.156.1229107742577; Fri, 12 Dec 2008 10:49:02 -0800 (PST) Original-Received: from ?192.168.1.2? (pool-173-51-86-88.lsanca.fios.verizon.net [173.51.86.88]) by mx.google.com with ESMTPS id f42sm2528578rvb.7.2008.12.12.10.48.59 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Dec 2008 10:49:01 -0800 (PST) In-Reply-To: X-Mailer: Evolution 2.24.2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 12 Dec 2008 14:04:23 -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:23242 Archived-At: On Thu, 2008-12-11 at 18:52 -0500, Glenn Morris wrote: > Derick Eddington wrote: > > > The documentation at "23.6.1 Font Lock Basics" and "23.6.5 Levels of > > Font Lock" refers to level numbers starting at 1, but 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 don't really understand the problem. What exactly are you > customizing, and how? > > In general, the actual Lisp expression used by Customize is not > terribly important - use a tag instead to give a more human-readable > set of choices (eg "minimum", "medium", "maximum" rather than 1, 2, 3). I'm customizing `font-lock-maximum-decoration'. It's documentation says: Maximum decoration level for fontification. If nil, use the default decoration (typically the minimum available). If t, use the maximum decoration available. If a number, use that level of decoration (or if not available the maximum). If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL), where MAJOR-MODE is a symbol or t (meaning the default). For example: ((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. I'm using the last form with an association for my mode. I have 4 levels. I haven't yet learned how to use tags with Customize, I'll read about that. But for my mode, I think tag names would not be as clear as just the numbers. If Customize is going to allow numbers, shouldn't their indexing base be consistent with the documentation? 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 INS Which is not the Lisp syntax and is showing a number. This isn't a big deal to me, but the Emacs' documentation tells me to report things like this. -- : Derick ----------------------------------------------------------------