From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Feature request: permanent-local values in hooks buffer local values
Date: Sun, 09 Dec 2007 15:21:48 +0100 [thread overview]
Message-ID: <475BF9FC.4050705@gmail.com> (raw)
In-Reply-To: <E1J1LOq-0007PR-T4@fencepost.gnu.org>
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.)
next prev parent reply other threads:[~2007-12-09 14:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 17:15 Feature request: permanent-local values in hooks buffer local values Lennart Borgman (gmail)
2007-12-03 18:22 ` Juanma Barranquero
2007-12-04 4:56 ` Richard Stallman
2007-12-04 18:13 ` Lennart Borgman (gmail)
2007-12-05 6:05 ` Richard Stallman
2007-12-05 7:21 ` Lennart Borgman (gmail)
2007-12-06 2:11 ` Richard Stallman
2007-12-07 0:25 ` Lennart Borgman (gmail)
2007-12-09 12:36 ` Richard Stallman
2007-12-09 14:21 ` Lennart Borgman (gmail) [this message]
2007-12-09 15:24 ` Lennart Borgman (gmail)
2007-12-09 23:19 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=475BF9FC.4050705@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.