From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Feature request: permanent-local values in hooks buffer local values Date: Wed, 05 Dec 2007 21:11:58 -0500 Message-ID: References: <475439BD.7070000@gmail.com> <475598CF.4050200@gmail.com> <47565186.8080909@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1196907237 23317 80.91.229.12 (6 Dec 2007 02:13:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2007 02:13:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 06 03:14:06 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J06FZ-0007EX-UK for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2007 03:14:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J06FJ-0000uu-0x for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2007 21:13:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J06Da-0008A6-OO for emacs-devel@gnu.org; Wed, 05 Dec 2007 21:12:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J06DX-000888-Mh for emacs-devel@gnu.org; Wed, 05 Dec 2007 21:12:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J06DX-000882-Hz for emacs-devel@gnu.org; Wed, 05 Dec 2007 21:11:59 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J06DX-0001e6-2n for emacs-devel@gnu.org; Wed, 05 Dec 2007 21:11:59 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J06DW-00007j-Tm; Wed, 05 Dec 2007 21:11:58 -0500 In-reply-to: <47565186.8080909@gmail.com> (lennart.borgman@gmail.com) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:84770 Archived-At: In a way, yes. But remember the goal. It is to let a minor mode that is turned on in the buffer survive changing major mode. There are two kind of things to survive: 1) buffer local variable values, which are survived by using (put 'VARIABLE 'permanent-local t) 2) buffer local entries in hooks. Those are what I am asking about here. I see. I did not understand your aim before. Here's a possible implementation. 1. Put a property on hook variables to identify them for this special processing. 2. Put another property (as you suggested) on hook functions to indicate they should be preserved. 3. Now it is possible for kill-all-local-variables to identify hook variables, scan their local values, and preserve specific hooks.