Change doom-popup-buffer & doom-popup-file signature
...and update its references.
This commit is contained in:
parent
51fa99996d
commit
558a8d973c
3 changed files with 14 additions and 10 deletions
|
@ -76,6 +76,7 @@
|
||||||
+ Fixed ~make update~ to work even if Doom is installed somewhere other than ~\~/.emacs.d~ (see [[https://github.com/hlissner/doom-emacs/issues/190][#190]]).
|
+ Fixed ~make update~ to work even if Doom is installed somewhere other than ~\~/.emacs.d~ (see [[https://github.com/hlissner/doom-emacs/issues/190][#190]]).
|
||||||
+ Removed colons from makefile task target names (like =compile:core=); replaced them with dashses, e.g. =compile-core=. Colons broke compatibility with certain versions of make.
|
+ Removed colons from makefile task target names (like =compile:core=); replaced them with dashses, e.g. =compile-core=. Colons broke compatibility with certain versions of make.
|
||||||
+ Changed the signature of ~doom-resize-window~ to accept two more arguments, =WINDOW= and =FORCE-P=: ~doom-resize-window WINDOW NEW-SIZE &optional HORIZONTAL FORCE-P~. If =FORCE-P= is non-nil, this function will resize a window regardless of ~window-size-fixed~.
|
+ Changed the signature of ~doom-resize-window~ to accept two more arguments, =WINDOW= and =FORCE-P=: ~doom-resize-window WINDOW NEW-SIZE &optional HORIZONTAL FORCE-P~. If =FORCE-P= is non-nil, this function will resize a window regardless of ~window-size-fixed~.
|
||||||
|
+ ~doom-popup-buffer~ and ~doom-popup-file~ no longer take a second variadic argument. Their signature is now ~doom-popup-buffer buffer plist &optional extend-p~ and ~doom-popup-file file plist &optional extend-p~, where =EXTEND-P= will cause =PLIST= to extend from the base rule for that buffer.
|
||||||
+ =feature=
|
+ =feature=
|
||||||
+ =hydra= Display a separator along the bottom of hydra windows for extra contrast.
|
+ =hydra= Display a separator along the bottom of hydra windows for extra contrast.
|
||||||
+ =ui=
|
+ =ui=
|
||||||
|
|
|
@ -16,16 +16,19 @@ current window if omitted."
|
||||||
target)))))
|
target)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-popup-buffer (buffer &rest plist)
|
(defun doom-popup-buffer (buffer plist &optional extend-p)
|
||||||
"Display BUFFER in a shackle popup. See `shackle-rules' for possible rules.
|
"Display BUFFER in a shackle popup with PLIST rules. See `shackle-rules' for
|
||||||
Returns the new popup window."
|
possible rules. If EXTEND-P is non-nil, don't overwrite the original rules for
|
||||||
|
this popup, just the specified properties. Returns the new popup window."
|
||||||
(declare (indent defun))
|
(declare (indent defun))
|
||||||
(unless (bufferp buffer)
|
(unless (bufferp buffer)
|
||||||
(error "%s is not a valid buffer" buffer))
|
(error "%s is not a valid buffer" buffer))
|
||||||
(setq plist (append plist (shackle-match buffer)))
|
|
||||||
(shackle-display-buffer
|
(shackle-display-buffer
|
||||||
buffer
|
buffer
|
||||||
nil (or plist (shackle-match buffer))))
|
nil (or (if extend-p
|
||||||
|
(append plist (shackle-match buffer))
|
||||||
|
plist)
|
||||||
|
(shackle-match buffer))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-popup-switch-to-buffer (buffer)
|
(defun doom-popup-switch-to-buffer (buffer)
|
||||||
|
@ -41,12 +44,12 @@ Returns the new popup window."
|
||||||
(set-window-dedicated-p nil t)))
|
(set-window-dedicated-p nil t)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-popup-file (file &rest plist)
|
(defun doom-popup-file (file plist &optional extend-p)
|
||||||
"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)
|
||||||
(user-error "Can't display file in popup, it doesn't exist: %s" file))
|
(user-error "Can't display file in popup, it doesn't exist: %s" file))
|
||||||
(doom-popup-buffer (find-file-noselect file t) plist))
|
(doom-popup-buffer (find-file-noselect file t) plist extend-p))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-popup-windows ()
|
(defun doom-popup-windows ()
|
||||||
|
@ -76,7 +79,7 @@ Returns t if popups were restored, nil otherwise."
|
||||||
(find-file-noselect file t))))
|
(find-file-noselect file t))))
|
||||||
(when size
|
(when size
|
||||||
(setq rules (plist-put rules :size size)))
|
(setq rules (plist-put rules :size size)))
|
||||||
(when (and buffer (apply #'doom-popup-buffer buffer rules) (not any-p))
|
(when (and buffer (doom-popup-buffer buffer rules) (not any-p))
|
||||||
(setq any-p t))))
|
(setq any-p t))))
|
||||||
(when any-p
|
(when any-p
|
||||||
(setq doom-popup-history '()))
|
(setq doom-popup-history '()))
|
||||||
|
@ -136,7 +139,7 @@ only close popups that have an :autoclose property in their rule (see
|
||||||
(defun doom/popup-this-buffer ()
|
(defun doom/popup-this-buffer ()
|
||||||
"Display currently selected buffer in a popup window."
|
"Display currently selected buffer in a popup window."
|
||||||
(interactive)
|
(interactive)
|
||||||
(doom-popup-buffer (current-buffer) :align t :autokill t))
|
(doom-popup-buffer (current-buffer) '(:align t :autokill t)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/popup-toggle-messages ()
|
(defun doom/popup-toggle-messages ()
|
||||||
|
|
|
@ -486,7 +486,7 @@ the command buffer."
|
||||||
|
|
||||||
(after! mu4e
|
(after! mu4e
|
||||||
(defun doom*mu4e-popup-window (buf _height)
|
(defun doom*mu4e-popup-window (buf _height)
|
||||||
(doom-popup-buffer buf :size 10 :noselect t)
|
(doom-popup-buffer buf '(:size 10 :noselect t))
|
||||||
buf)
|
buf)
|
||||||
(advice-add #'mu4e~temp-window :override #'doom*mu4e-popup-window))
|
(advice-add #'mu4e~temp-window :override #'doom*mu4e-popup-window))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue