* kill-buffer-hook permanent-local
@ 2003-06-01 18:35 Stefan Monnier
2003-06-03 4:07 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2003-06-01 18:35 UTC (permalink / raw)
Shouldn't kill-buffer-hook be permanent-local ?
After all, if you want to be told when the buffer gets killed,
you probably don't want that to be defeated by a mere change
of major-mode.
More specifically, either you want to be told both when the buffer is killed
and when the mode changes, or you want to be told when the buffer is killed
whether or not the mode ever changes.
Looking at the various cases when kill-buffer-hook is used:
- gnus mml-destroy-buffers: called by change-major-mode-hook as well,
so permanent-localness is irrelevant.
- MH-E uses it for mh-tidy-draft-buffer (kill auxiliary buffer) and
mh-mime-cleanup (remove MIME info from a global hash table). It seems
that in both cases it would be better if the kill-buffer-hook were
permanent-local and it would at least not hurt.
- game-grid-kill-timer: also needs permanent-local.
- pong-quit: basically the same as game-grid-kill-timer.
- idlwave-kill-buffer-update: not clear which way is best, but since
the hook checks the major-mode, it probably doesn't make much of
a difference.
- idlwave-shell-delete-temp-files: here also permanentness would help.
- idlwave-shell-kill-shell-buffer-confirm: doesn't make much of a difference
either way.
- register-swap-out: this turns markers into filename+offset and would
also benefit from permanentness.
- server-kill-buffer: again, making it permanent-local would help.
uniquify.el used to use it locally but stopped because it needed it
to be permanent-local. The code now uses a global hook instead
and checks whether the hook should be run using a permanent-local
variable ;-)
I suspect a few other global uses could be made buffer-local if the
hook was permanent-local.
Any objection ?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-03 4:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-01 18:35 kill-buffer-hook permanent-local Stefan Monnier
2003-06-03 4:07 ` Richard Stallman
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.