mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Refactor +popup*org-pop-to-buffer
Simplify pop-to-buffer call.
This commit is contained in:
@ -234,10 +234,7 @@ instead of switch-to-buffer-*."
|
||||
(defun +popup*org-pop-to-buffer (orig-fn buf &optional norecord)
|
||||
"Use `pop-to-buffer' instead of `switch-to-buffer' to open buffer.'"
|
||||
(if +popup-mode
|
||||
(pop-to-buffer
|
||||
(cond ((stringp buf) (get-buffer-create buf))
|
||||
((bufferp buf) buf)
|
||||
(t (error "Invalid buffer %s" buf))))
|
||||
(pop-to-buffer buf nil norecord)
|
||||
(funcall orig-fn buf norecord)))
|
||||
(advice-add #'org-switch-to-buffer-other-window :around #'+popup*org-pop-to-buffer)
|
||||
|
||||
|
Reference in New Issue
Block a user