Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked from the menu and behaves unpredictably when invoked programmatically.
This commit is contained in:
parent
0c743afcfd
commit
aa64cf9426
14 changed files with 22 additions and 22 deletions
|
@ -250,10 +250,10 @@ regex PATTERN. Returns the number of killed buffers."
|
|||
|
||||
;;;###autoload
|
||||
(defun doom*switch-to-fallback-buffer-maybe (orig-fn)
|
||||
"Advice for `kill-this-buffer'. If in a dedicated window, delete it. If there
|
||||
"Advice for `kill-current-buffer'. If in a dedicated window, delete it. If there
|
||||
are no real buffers left OR if all remaining buffers are visible in other
|
||||
windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
||||
`kill-this-buffer'."
|
||||
`kill-current-buffer'."
|
||||
(let ((buf (current-buffer)))
|
||||
(cond ((window-dedicated-p)
|
||||
(delete-window))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue