> It would be nice to support the value t as a shortcut that means all modes. OK. > Then the name could be just 'quit-window-kill-buffer' for symmetry with > 'kill-buffer-quit-windows'. Hmm... What about people who eventually expect buffer names or regexps to match the name of the window's buffer? > Wouldn't it be better to check for derived modes with 'derived-mode-p'? > Then it's possible to detect all modes inheriting from special-mode, > e.g. (derived-mode-p '(special-mode)). OK. >> Maybe its handling should go to 'quit-restore-window' itself. >> Or we should have 'quit-windows-on' handle it too. >> Then what about 'delete-windows-on'? > > Not sure about other functions. Me neither. Maybe your original statement that it really is the "q" we want to handle could be done via an additional condition like (eq (key-binding "q") 'quit-window) New patch attached. martin