General cleanup & refector; update TODO.org
This commit is contained in:
parent
9cfdd9a413
commit
7fbaf2ced1
5 changed files with 23 additions and 11 deletions
|
@ -153,6 +153,7 @@ See `doom-real-buffer-p' for what 'real' means."
|
|||
(let* ((buffer (or buffer (current-buffer)))
|
||||
(buffer-win (get-buffer-window buffer))
|
||||
(only-buffer-window-p (= 1 (length (get-buffer-window-list buffer nil t)))))
|
||||
;; deal with unsaved buffers
|
||||
(when (and only-buffer-window-p
|
||||
(buffer-file-name buffer)
|
||||
(buffer-modified-p buffer))
|
||||
|
@ -161,10 +162,12 @@ See `doom-real-buffer-p' for what 'real' means."
|
|||
(yes-or-no-p "Buffer is unsaved, save it?"))
|
||||
(save-buffer)
|
||||
(set-buffer-modified-p nil))))
|
||||
;; deal with dedicated windows
|
||||
(if (window-dedicated-p buffer-win)
|
||||
(unless (window--delete buffer-win t t)
|
||||
(split-window buffer-win)
|
||||
(window--delete buffer-win t t))
|
||||
;; cycle to a real buffer
|
||||
(doom--cycle-real-buffers -1)
|
||||
(when buffer-win
|
||||
(unrecord-window-buffer buffer-win buffer))
|
||||
|
|
|
@ -18,8 +18,7 @@ current window if omitted."
|
|||
(declare (indent defun))
|
||||
(unless (bufferp buffer)
|
||||
(error "%s is not a valid buffer" buffer))
|
||||
(when (and plist (not (plist-member plist :align)))
|
||||
(plist-put plist :align t))
|
||||
(setq plist (doom*shackle-always-align plist))
|
||||
(shackle-display-buffer
|
||||
buffer
|
||||
nil (or plist (shackle-match buffer))))
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
(defvar-local doom-popup-rules nil
|
||||
"The shackle rule that caused this buffer to be recognized as a popup.")
|
||||
|
||||
(defvar doom-popup-window-parameters '(:noesc :modeline :autokill :autoclose)
|
||||
(defvar doom-popup-window-parameters
|
||||
'(:noesc :modeline :autokill :autoclose)
|
||||
"A list of window parameters that are set (and cleared) when `doom-popup-mode
|
||||
is enabled/disabled.'")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue