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:24:46 -0400 Message-ID: <87is0x22oq.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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1117661760 13758 80.91.229.2 (1 Jun 2005 21:36:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2005 21:36:00 +0000 (UTC) Cc: emacs-devel@gnu.org, teirllm@dms.auburn.edu, mmaug@yahoo.com, 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:35:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DdaqP-0004aR-6k for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2005 23:33:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ddavl-0003r2-Ny for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2005 17:39:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DdarN-0002To-CY for emacs-devel@gnu.org; Wed, 01 Jun 2005 17:34:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ddar9-0002KB-LG for emacs-devel@gnu.org; Wed, 01 Jun 2005 17:34:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ddar7-0002DH-QC for emacs-devel@gnu.org; Wed, 01 Jun 2005 17:34:29 -0400 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ddajn-00081R-Rr; Wed, 01 Jun 2005 17:26:56 -0400 Original-Received: from alfajor ([67.71.32.43]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050601212447.ZQQY21470.tomts22-srv.bellnexxia.net@alfajor>; Wed, 1 Jun 2005 17:24:47 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id B7A37D7339; Wed, 1 Jun 2005 17:24:46 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed, 01 Jun 2005 13:22:43 -0400") 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:38015 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38015 > Maybe we should label each of these things by the name of the minor > mode. That way, we could tell which of them to discard. Or we could > give each one a flag saying whether to preserve it when changing the > major mode. > Would that solve the problem? Yes, I think a real solution is to define a new way to add keywords. It could look like a new var minor-mode-font-lock-keywords-alist modelled after minor-mode-map-alist. I think the important part is that the API should be declarative rather than imperative, so that at any point in time we can reconstruct font-lock-keywords from font-lock-defaults and whatever other keyword-sources there can be (such as minor-mode-font-lock-keywords-alist). Stefan