From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Tue, 31 May 2005 11:30:58 -0500 (CDT) Message-ID: <200505311630.j4VGUwH18275@raven.dms.auburn.edu> 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> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1117557139 17783 80.91.229.2 (31 May 2005 16:32:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 May 2005 16:32:19 +0000 (UTC) Cc: Lute.Kamstra.lists@xs4all.nl, dominik@science.uva.nl, mmaug@yahoo.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 31 18:32:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dd9dL-0005Rr-Qq for ged-emacs-devel@m.gmane.org; Tue, 31 May 2005 18:30:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dd9iT-0003He-7C for ged-emacs-devel@m.gmane.org; Tue, 31 May 2005 12:35:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dd9hx-0002wQ-Lk for emacs-devel@gnu.org; Tue, 31 May 2005 12:35:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dd9hw-0002vc-1P for emacs-devel@gnu.org; Tue, 31 May 2005 12:35:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dd9hv-0002vM-TR for emacs-devel@gnu.org; Tue, 31 May 2005 12:35:11 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dd9gF-00085h-D2; Tue, 31 May 2005 12:33:27 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j4VGVXCK029540; Tue, 31 May 2005 11:31:33 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j4VGUwH18275; Tue, 31 May 2005 11:30:58 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Tue, 31 May 2005 00:18:14 -0400) 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:37947 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37947 Richard Stallman wrote: Suppose we make font-lock-add-keywords with nil for MODE record its argument in some permanent buffer-local variable. Then changing the major mode and reenabling font-lock would use the same keywords previously added. As I already said, if that variable _needs_ to be permanent local, then there are already other problems right now with Font Lock, which are thousands of times more likely to occur than the ones we are worrying about right now. If it does not need to be permanent local, it appears to duplicate font-lock-keywords-alist, so one can quite as well use that one. It would seem easy to make font-lock-{add,remove}-keywords, with a nil argument for MODE, add/remove the keyword to font-lock-keywords-alist in addition to enabling or disabling the keyword instantaneously. Stefan can tell whether that would solve the present problem (I believe it would) without introducing new unrelated ones (I do not know about that). Sincerely, Luc.