From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: font-lock-maximum-decoration and how to make a defaultfont-lock lower than maximal? Date: Fri, 17 Aug 2012 08:57:28 -0700 Message-ID: <95FA6116C6194DAAA658F916B48C5E23@us.oracle.com> References: <87wr0x8zxj.fsf@gmail.com> <831uj5bnid.fsf@gnu.org> <87obm98trc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345219072 17051 80.91.229.3 (17 Aug 2012 15:57:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2012 15:57:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Vitalie Spinu'" , "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 17 17:57:52 2012 Return-path: Envelope-to: ged-emacs-devel@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 1T2Ovm-0007dG-OS for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2012 17:57:50 +0200 Original-Received: from localhost ([::1]:51684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Ovl-0002Ob-My for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2012 11:57:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Ovi-0002GZ-3K for emacs-devel@gnu.org; Fri, 17 Aug 2012 11:57:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2Ovg-0004py-V4 for emacs-devel@gnu.org; Fri, 17 Aug 2012 11:57:45 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:35706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Ove-0004oZ-AA; Fri, 17 Aug 2012 11:57:42 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q7HFvaxo021767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Aug 2012 15:57:36 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q7HFvZBI015579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Aug 2012 15:57:36 GMT Original-Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q7HFvZ6H011364; Fri, 17 Aug 2012 10:57:35 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 17 Aug 2012 08:57:35 -0700 X-Mailer: Microsoft Office Outlook 11 In-reply-to: <87obm98trc.fsf@gmail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac18hpKQLJcmR/BBSbuTryrwPesXQQACBgGA X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152616 Archived-At: > > I think it's not up to the mode developer to decide that. > > It's up to the user. So you as developer should provide > > all the fontifications your users may wish to have, Or that you might want your users to have. ;-) > > and let them decide what to activate. > > You mean "let them decide what to deactivate"? I can't speak for what Eli meant, but yes, let the users decide. > All levels are activated by default (font-lock-maximum-decoration is t). Yes, Emacs Dev concluded after many years that `t' is the most appropriate default value. As with any user option, one size might not fit all, and it might not be obvious to users that there is an option for changing this, and even for changing it on a per-mode basis. You might want to remind them, for your mode. > And obviously some guys (may be including the developer) don't like that. If you mean that you don't like `t' to be the default, then argue here for a change in default value. If you mean that you don't like `t' for your own use, then customize the option. If you mean that you don't want the default behavior for a mode you create to be maximum, then you are out of luck. You can restrict extra fontification in your mode by simply not providing it. But if you provide more than one fontification level then users get to choose which level to use, and the default is maximum fontification. You can also add to the Commentary for your mode (or even to the mode's doc string, if you think it is important) that you recommend setting the font-lock decoration for this mode to ___. Or just remind users about the possibility - e.g., ;; If you want a minimum fontification for Foobar mode, ;; then customize option `font-lock-maximum-decoration'. ;; If you want a different fontification level for Foobar ;; than for other modes, you can do this too by customizing ;; `font-lock-maximize-decoration'.