GNU bug report logs -
#9867
24.0.90; quit-window should provide quit-window-hook
Previous Next
Reported by: Christoph Scholtes <cschol2112 <at> googlemail.com>
Date: Tue, 25 Oct 2011 04:07:01 UTC
Severity: minor
Tags: fixed
Found in version 24.0.90
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #15 received at 9867 <at> debbugs.gnu.org (full text, mbox):
> It seems like Chong OK'd this hook at the time, but it was never added
> to Emacs. I've now added it to Emacs 27, because it seems like a useful
> addition to have -- now modes that need to do some clean-up thing before
> doing whatever `quit-window' does can just add that to the hook
> (buffer-locally).
'quit-restore-window' can quit _any_ window not just the selected one.
This means that if a user puts something on a normal hook run by that
function, that something can only guess at which window is really quit
by that function. Also, running a buffer-local value of that hook is
meaningless given the current implementation. See the tribulations
run_window_configuration_change_hook runs into when trying to overcome
a similar problem (and note the unwind-protection overhead it incurs).
If people really need such a hook at all, please
- Make it either an abnormal hook run with the window quit as argument
or run it from 'quit-window' but then only if it quits the selected
window.
- Make sure to call any buffer-local value of that hook for the buffer
of the window that is quit.
- Prefix it with 'quit-restore-' if you intend to run it from
'quit-restore-window' (that function may be called by other
functions as well).
- Fix the reference to the non-existent function 'quit-buffer'.
Thanks, martin
This bug report was last modified 5 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.