feature/popup: add :ignore support to :popup
Allows you to ignore certain buffers. Helpful for plugins that manage their own windows, like magit. To use: (set! :popup "^\\*magit" :ignore) Relevant to #337
This commit is contained in:
parent
bfcbb9ca01
commit
a4e22d48b8
1 changed files with 17 additions and 14 deletions
|
@ -121,20 +121,23 @@ ALIST supports one custom parameter: `size', which will resolve to
|
|||
`window-height' or `window-width' depending on `side'."
|
||||
`(let ((alist ,alist)
|
||||
(parameters ,parameters))
|
||||
,(when alist
|
||||
`(when-let* ((size (cdr (assq 'size alist)))
|
||||
(side (or (cdr (assq 'side (append alist +popup-default-alist))) 'bottom)))
|
||||
(map-delete alist 'size)
|
||||
(map-put alist (if (memq side '(left right))
|
||||
'window-width
|
||||
'window-height)
|
||||
size)))
|
||||
(prog1 (push (append (list ,condition '(+popup-buffer))
|
||||
alist
|
||||
(list (cons 'window-parameters parameters)))
|
||||
+popup--display-buffer-alist)
|
||||
(when (bound-and-true-p +popup-mode)
|
||||
(setq display-buffer-alist +popup--display-buffer-alist)))))
|
||||
(if (eq alist :ignore)
|
||||
(push (list ,condition nil) +popup--display-buffer-alist)
|
||||
,(when alist
|
||||
`(when-let* ((size (cdr (assq 'size alist)))
|
||||
(side (or (cdr (assq 'side (append alist +popup-default-alist)))
|
||||
'bottom)))
|
||||
(map-delete alist 'size)
|
||||
(map-put alist (if (memq side '(left right))
|
||||
'window-width
|
||||
'window-height)
|
||||
size)))
|
||||
(prog1 (push (append (list ,condition '(+popup-buffer))
|
||||
alist
|
||||
(list (cons 'window-parameters parameters)))
|
||||
+popup--display-buffer-alist)))
|
||||
(when (bound-and-true-p +popup-mode)
|
||||
(setq display-buffer-alist +popup--display-buffer-alist))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue