elisp-refs-mode derives from special-mode, which already has q bound to quit-window. Most special mode derivatives leave this alone so quit-restore-window can decide what's the right thing to do next. With q bound to kill-buffer, quit-restore-window doesn't have a chance to run and leaves a duplicate window showing some already shown buffer when window managers like window-purpose is active.
elisp-refs-mode
derives fromspecial-mode
, which already hasq
bound toquit-window
. Most special mode derivatives leave this alone soquit-restore-window
can decide what's the right thing to do next. Withq
bound tokill-buffer
,quit-restore-window
doesn't have a chance to run and leaves a duplicate window showing some already shown buffer when window managers likewindow-purpose
is active.