|
From: | Lennart Borgman (gmail) |
Subject: | Re: Feature request: permanent-local values in hooks buffer local values |
Date: | Sun, 09 Dec 2007 15:21:48 +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:
Then in `flymake-mode' a call to the functions`flymake-add-survivor' and `flymake-remove-survivor \(which was defined by the macro called above) must be done.This seems like a very cumbersome interface. I think it is very unclean to dynamically change `permanent-local' properties. That's the sort of thing that we are sure to regret. We should use my mechanism instead. It is simple and clean.
That is very fine with me. I suggest then adding something like this to the end of add-hook: (when (and local (get function 'permanent-local-in-hooks)) (put hook 'permanent-local-hook t)Then in kill-local-variables check for the property 'permanent-local-hook and handle the hook accordingly.
I can see no reasonable way to remove the property 'permanent-local-hook from the hook variable. (The problem is that properties do not have buffer local values. It could be simulated by having a buffer local variable carrying the propery, but I see no reason to make it that complicated.)
[Prev in Thread] | Current Thread | [Next in Thread] |