summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.config/emacs-kj/init.el')
-rw-r--r--emacs/.config/emacs-kj/init.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el
index cbb4aaa..053dcb6 100644
--- a/emacs/.config/emacs-kj/init.el
+++ b/emacs/.config/emacs-kj/init.el
@@ -752,12 +752,21 @@
;; (add-to-list 'display-buffer-alist
;; '("\\*info" (display-buffer-same-window)))
-(add-to-list 'display-buffer-alist
- `(,(rx (| "*Help*"
+(defun kj/popup-buffer (buffer condition)
+ (or (s-matches-p (rx (| "*Help*"
"*info*"
+ (seq "*eldoc " (* anything) "*")
(seq "*WoMan " (* anything) "*")
(seq "*man " (* anything) "*")
- "*Occur*"))
+ "*Occur*")) buffer)
+ (with-current-buffer buffer
+ (apply #'derived-mode-p
+ '(magit-mode
+ compilation-mode)))
+ ))
+
+(add-to-list 'display-buffer-alist
+ `(kj/popup-buffer
(display-buffer-in-side-window)
(side . right)
(slot . 0)