1

Adjust buffer display and pop-to-buffer behavior

This commit is contained in:
Jessie Hildebrandt 2023-03-16 11:35:22 -04:00
parent 7ebe22a5ef
commit c14acd3b25

View File

@ -244,7 +244,7 @@ init file, which initializes the package manager during compile time."
(defun user/scratch-buffer ()
"Open the scratch buffer, (re)creating it if not present."
(interactive)
(pop-to-buffer (startup--get-buffer-create-scratch) '((display-buffer-reuse-window display-buffer-same-window))))
(pop-to-buffer (startup--get-buffer-create-scratch)))
(defun user/scan-directory-for-projects ()
"Prompt for a directory and then scan for any project roots within.
@ -359,6 +359,10 @@ DOCSTRING is an optional form that is discarded upon expansion."
unresolved
docstrings))
;; Set default buffer display action priority:
;; focus a window already displaying the buffer, else display buffer in current window
(display-buffer-base-action '((display-buffer-reuse-window display-buffer-same-window)))
;; Filter out buffer-incompatible interactive commands by default
(read-extended-command-predicate #'command-completion-default-include-p)