doom-popup-{buffeer,file}: make variadic
This commit is contained in:
parent
e80df3c03c
commit
22fdf9e2ab
1 changed files with 4 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
(window-parameter window 'popup))))
|
(window-parameter window 'popup))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-popup-buffer (buffer &optional plist)
|
(defun doom-popup-buffer (buffer &rest plist)
|
||||||
"Display BUFFER in a shackle popup. See `shackle-rules' for possible rules."
|
"Display BUFFER in a shackle popup. See `shackle-rules' for possible rules."
|
||||||
(let* ((buffer-name (cond ((stringp buffer) buffer)
|
(let* ((buffer-name (cond ((stringp buffer) buffer)
|
||||||
((bufferp buffer) (buffer-name buffer))
|
((bufferp buffer) (buffer-name buffer))
|
||||||
|
@ -16,12 +16,14 @@
|
||||||
(buffer (get-buffer-create buffer-name)))
|
(buffer (get-buffer-create buffer-name)))
|
||||||
(unless (doom-popup-p)
|
(unless (doom-popup-p)
|
||||||
(setq doom-popup-other-window (selected-window)))
|
(setq doom-popup-other-window (selected-window)))
|
||||||
|
(when (and plist (not (plist-member plist :align)))
|
||||||
|
(plist-put plist :align shackle-default-alignment))
|
||||||
(shackle-display-buffer
|
(shackle-display-buffer
|
||||||
buffer
|
buffer
|
||||||
nil (or plist (shackle-match buffer-name)))))
|
nil (or plist (shackle-match buffer-name)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-popup-file (file &optional plist)
|
(defun doom-popup-file (file &rest plist)
|
||||||
"Display FILE in a shackle popup, with PLIST rules. See `shackle-rules' for
|
"Display FILE in a shackle popup, with PLIST rules. See `shackle-rules' for
|
||||||
possible rules."
|
possible rules."
|
||||||
(unless (file-exists-p file)
|
(unless (file-exists-p file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue