From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Wed, 01 Jun 2005 17:21:36 -0400 Message-ID: <87oeap231t.fsf-monnier+emacs@gnu.org> 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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1117661951 14342 80.91.229.2 (1 Jun 2005 21:39:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2005 21:39:11 +0000 (UTC) Cc: mmaug@yahoo.com, emacs-devel@gnu.org, rms@gnu.org, Lute.Kamstra.lists@xs4all.nl, dominik@science.uva.nl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 01 23:39:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DdauT-00057a-3s for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2005 23:37:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ddazp-0005KM-Qg for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2005 17:43:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DdarR-0002Ul-9F for emacs-devel@gnu.org; Wed, 01 Jun 2005 17:34:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DdarF-0002NZ-Ay for emacs-devel@gnu.org; Wed, 01 Jun 2005 17:34:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DdarC-0002DH-PA for emacs-devel@gnu.org; Wed, 01 Jun 2005 17:34:34 -0400 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ddagk-0007pN-De; Wed, 01 Jun 2005 17:23:46 -0400 Original-Received: from alfajor ([67.71.32.43]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050601212137.URT16985.tomts36-srv.bellnexxia.net@alfajor>; Wed, 1 Jun 2005 17:21:37 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 1ABA6D7339; Wed, 1 Jun 2005 17:21:37 -0400 (EDT) Original-To: Luc Teirlinck In-Reply-To: <200506011911.j51JBR025269@raven.dms.auburn.edu> (Luc Teirlinck's message of "Wed, 1 Jun 2005 14:11:27 -0500 (CDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:38016 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38016 > I still do not understand exactly what a nil argument for MODE in > font-lock-{add,remove}-keywords is supposed to accomplish. It adds the keywords for the current buffer only. > When used from a Lisp program (such as a minor mode), it is recommended to > use nil for mode (and place the call on a hook) to avoid subtle problems > due to details of the implementation. > Which subtle problems? Can't remember. IIRC there were problems where adding keywords to comint-mode didn't add them to all derivatives. And the implementation of the non-nil case is sufficiently horrendous to make you confident that there will be other subtle problems. > It seems to me that a _global_ minor mode _should_ use a non-nil MODE > argument when adding or removing a keyword. I'm not sure what you mean by a "global minor mode" (do you mean define-minor-mode :global, or define-global-minor-mode). But in any case your statement doesn't make much sense to me: if the minor mode is global, to *which* MODE should it add keywords? > Do the "subtle problems" refer to problems that occur when trying to make > font-lock-keywords-alist buffer local, as a buffer local minor mode might > be tempted to do? No, I've never seen anyone try to make font-lock-keywords-alist buffer-local (thank god). Stefan