[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: permanent-local values in hooks buffer local values
From: |
Lennart Borgman (gmail) |
Subject: |
Re: Feature request: permanent-local values in hooks buffer local values |
Date: |
Wed, 05 Dec 2007 08:21:42 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Richard Stallman wrote:
> Isn't change-major-mode-hook sufficient to take care of this need?
Perhaps you meant after-change-major-mode-hook?
Isn't this about cleaning up something after you exit a major mode?
`change-major-mode-hook' is the feature for that.
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.
We have now mentioned three ways of achieving 2:
a) my original proposition in this thread
b) my (mis)interpretetion of your previous answer, where I suggested
using a global entry in after-change-major-mode-hook
c) your suggestion to use change-major-mode-hook.
Using change-major-mode-hook would require something like this AFAICS:
- The minor mode that want to survive puts a function in the buffer
local value of change-major-mode-hook.
- This function when called puts another function in the global value of
after-change-major-mode-hook. This function should then restore the
buffer local entries for the minor mode in the hooks. After this the
function removes itself from the global value of
after-change-major-mode-hook.
Is this the solution you would like?
- Feature request: permanent-local values in hooks buffer local values, Lennart Borgman (gmail), 2007/12/03
- Re: Feature request: permanent-local values in hooks buffer local values, Juanma Barranquero, 2007/12/03
- Re: Feature request: permanent-local values in hooks buffer local values, Richard Stallman, 2007/12/03
- Re: Feature request: permanent-local values in hooks buffer local values, Lennart Borgman (gmail), 2007/12/04
- Re: Feature request: permanent-local values in hooks buffer local values, Richard Stallman, 2007/12/05
- Re: Feature request: permanent-local values in hooks buffer local values,
Lennart Borgman (gmail) <=
- Re: Feature request: permanent-local values in hooks buffer local values, Richard Stallman, 2007/12/05
- Re: Feature request: permanent-local values in hooks buffer local values, Lennart Borgman (gmail), 2007/12/06
- Re: Feature request: permanent-local values in hooks buffer local values, Richard Stallman, 2007/12/09
- Re: Feature request: permanent-local values in hooks buffer local values, Lennart Borgman (gmail), 2007/12/09
- Re: Feature request: permanent-local values in hooks buffer local values, Lennart Borgman (gmail), 2007/12/09
- Re: Feature request: permanent-local values in hooks buffer local values, Richard Stallman, 2007/12/09