mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-02-21 23:31:05 -08:00
Refactor +popup*org-pop-to-buffer
Simplify pop-to-buffer call.
This commit is contained in:
parent
8fcc12ed08
commit
0dc0ccc63e
1 changed files with 1 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue