GNU bug report logs -
#76248
[Feature Request] user-option for killing buffer in `quit-window'.
Previous Next
Full log
Message #14 received at 76248 <at> debbugs.gnu.org (full text, mbox):
>>> and honestly I would prefer an option like: "quit-window-kill-buffer"
>>> (set to `nil' by default).
>>
>> I completely agree. The lack of this option causes so much trouble.
>
> Sounds useful, agreed. Why not have the option.
>
>> For example, I needed to define in the init file:
>>
>> (defun quit-window-kill-buffer ()
>> "Quit WINDOW and kill its buffer."
>> (interactive)
>> (quit-window 1))
>>
>> and then update each and every keymap to override 'quit-window'
>> with 'quit-window-kill-buffer':
>>
>> (define-key archive-mode-map "q" 'quit-window-kill-buffer)
>> (define-key tar-mode-map "q" 'quit-window-kill-buffer)
>> (define-key dired-mode-map "q" 'quit-window-kill-buffer)
>> ...
>
> (Maybe an advice could work for this?)
An advice has too wide coverage. Of course, it's possible
to check for major-mode in an advice. But it would be more clean
to set a buffer-local value of the new option either to non-nil
in modes where 'q' should kill the buffer, or to nil in some modes
when the user customized the new option to non-nil for all modes.
This bug report was last modified 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.