From 17409e174d8824c6272ac9d79d140fe06132250f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 14 May 2017 14:35:58 +0200 Subject: [PATCH] core-popups: remove :noclone; just don't clone unreal buffers --- core/core-popups.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/core/core-popups.el b/core/core-popups.el index a1c2df057..b209739df 100644 --- a/core/core-popups.el +++ b/core/core-popups.el @@ -57,12 +57,9 @@ is enabled/disabled.'") ;; to fetch a modeline config. Set in `doom-popup-mode'. ;; :autokill If non-nil, the buffer in these popups will be killed ;; when their popup is closed. Used by - ;; `doom*delete-popup-window' + ;; `doom*delete-popup-window'. NOTE This will render + ;; `doom/popup-restore' unusable for this buffer. ;; :autoclose If non-nil, close popup if ESC is pressed from any buffer. - ;; :noclone If non-nil, don't try to clone the buffer. This helps with - ;; buffers with buttons/links that, when followed, should - ;; open within the popup, rather than outside of it. Like - ;; help buffers or eshell-term buffers. shackle-rules '(("^ ?\\*doom:.+\\*$" :size 25 :modeline minimal :regexp t :noesc t) ("^ ?\\*doom .+\\*$" :size 10 :noselect t :regexp t) @@ -75,7 +72,7 @@ is enabled/disabled.'") ("*Apropos*" :size 0.3) ("*Backtrace*" :size 25 :noselect t) ("*Buffer List*" :size 20 :autokill t) - ("*Help*" :size 16 :noclone t) + ("*Help*" :size 16) ("*Messages*" :size 10 :noselect t) ("*Warnings*" :size 10 :noselect t :autokill t) ("*command-log*" :size 28 :noselect t :align right) @@ -197,9 +194,10 @@ and setting `doom-popup-rules' within it. Returns the window." (shackle-match (window-buffer (car args)))) ((bufferp (car args)) (shackle-match (car args)))))) + (buffer (get-buffer (car args))) window) - (when (and (not (plist-get plist :noclone)) - (get-buffer-window-list (get-buffer (car args)) nil t)) + (when (and (doom-real-buffer-p buffer) + (get-buffer-window-list buffer nil t)) (setq plist (append (list :autokill t) plist)) (setcar args (clone-indirect-buffer (buffer-name (car args)) nil t))) (unless (setq window (apply orig-fn args))