From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Thu, 2 Jun 2005 08:15:04 +0200 Message-ID: <17054.41960.623267.539414@sam.science.uva.nl> References: <87y8a3mnz8.fsf@xs4all.nl> <87ll63weye.fsf-monnier+emacs@gnu.org> <200505252135.j4PLZvt26969@raven.dms.auburn.edu> <87hdgrufcl.fsf-monnier+emacs@gnu.org> <200505260359.j4Q3xbj28809@raven.dms.auburn.edu> <87is16rsid.fsf-monnier+emacs@gnu.org> <200505261501.j4QF17h00246@raven.dms.auburn.edu> <87psveq60w.fsf-monnier+emacs@gnu.org> <200505271717.j4RHHGD07067@raven.dms.auburn.edu> <200505290157.j4T1vus10117@raven.dms.auburn.edu> <200505292354.j4TNsTE13354@raven.dms.auburn.edu> <200505311544.j4VFijq17680@raven.dms.auburn.edu> <200506011911.j51JBR025269@raven.dms.auburn.edu> Reply-To: Carsten Dominik NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1117694018 20143 80.91.229.2 (2 Jun 2005 06:33:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2005 06:33:38 +0000 (UTC) Cc: rms@gnu.org, Lute.Kamstra.lists@xs4all.nl, emacs-devel@gnu.org, mmaug@yahoo.com, monnier@iro.umontreal.ca, dominik@science.uva.nl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 02 08:33:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DdjGS-0007yp-9V for ged-emacs-devel@m.gmane.org; Thu, 02 Jun 2005 08:33:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DdjLt-0002KM-24 for ged-emacs-devel@m.gmane.org; Thu, 02 Jun 2005 02:38:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DdjFa-00010P-Gw for emacs-devel@gnu.org; Thu, 02 Jun 2005 02:32:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DdjFP-0000ve-Bu for emacs-devel@gnu.org; Thu, 02 Jun 2005 02:32:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DdjFN-0000TX-4h for emacs-devel@gnu.org; Thu, 02 Jun 2005 02:32:05 -0400 Original-Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ddj19-0002gQ-KN; Thu, 02 Jun 2005 02:17:23 -0400 Original-Received: from sam.science.uva.nl [146.50.10.135] by imap.science.uva.nl with ESMTP (sendmail 8.11.6p2/config 11.35). id j526F4k10632; Thu, 2 Jun 2005 08:15:04 +0200 X-Organisation: Faculty of Science, University of Amsterdam, The Netherlands X-URL: http://www.science.uva.nl/ Original-Received: by sam.science.uva.nl (Postfix, from userid 11669) id BDE031786A; Thu, 2 Jun 2005 08:15:04 +0200 (CEST) Original-To: Luc Teirlinck In-Reply-To: <200506011911.j51JBR025269@raven.dms.auburn.edu> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Virus-Scanned: by amavisd-new X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38034 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38034 Hi guys, could you please take me off the cc for this discussion? Thanks. - Carsten >>>>> "LT" == Luc Teirlinck writes: LT> I still do not understand exactly what a nil argument for MODE in LT> font-lock-{add,remove}-keywords is supposed to accomplish. The LT> font-lock-add-keywords docstring contains the following mysterious LT> sentence: LT> When used from a Lisp program (such as a minor mode), it is recommended to LT> use nil for mode (and place the call on a hook) to avoid subtle problems LT> due to details of the implementation. LT> Which subtle problems? LT> It seems to me that a _global_ minor mode _should_ use a non-nil MODE LT> argument when adding or removing a keyword. Do the "subtle problems" LT> refer to problems that occur when trying to make LT> font-lock-keywords-alist buffer local, as a buffer local minor mode LT> might be tempted to do? A permanent buffer-local minor mode that LT> wants to add the keyword independent of the mode could use LT> after-change-major-mode-hook to add it. With my latest set of patches LT> that will work for modes that run that hook. If the minor mode wants LT> to add it for a particular mode and all its derived modes, it can, LT> after my patches, add it to the mode hook, as long as the mode and its LT> ancestor modes follow the new major mode conventions. Only adding it LT> to a mode, but not to its derived modes, is problematic after my LT> patches, as well as without them. LT> Maybe one could have a font-lock-local-keywords-alist, that would be LT> _in addition_ to font-lock-keywords-alist. That should be a LT> non-permanent local and could be used by non-permanent buffer local minor LT> modes. If one is not willing to rely on after-change-major-mode-hook, LT> there could be a separate font-lock-permanent-local-keywords-alist, LT> for permanent-local minor modes. LT> All of this assuming that I am guessing the purpose of a nil argument LT> correctly. LT> Sincerely, LT> Luc. -- Carsten Dominik \ _ / Sterrenkundig Instituut "Anton Pannekoek" |X| _ Kruislaan 403; NL-1098 SJ Amsterdam /| |\ _ _ _/ \ phone +31 (20) 525-7477; FAX +31 (20) 525-7484 __|o|___/ ~~ \___/ ~~~