Fix prefix arg for doom/switch-to-scratch-buffer

Also use clearer name for prefix arg var in
doom/open-project-scratch-buffer.
This commit is contained in:
Henrik Lissner 2019-07-21 15:47:40 +02:00
parent 832b7e9294
commit c7ce21af70
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -115,17 +115,19 @@ If PROJECT-P is non-nil, open a persistent scratch buffer associated with the
;;;###autoload ;;;###autoload
(defun doom/switch-to-scratch-buffer (&optional project-p) (defun doom/switch-to-scratch-buffer (&optional project-p)
"Like `doom/open-scratch-buffer', but switches to it in the current window." "Like `doom/open-scratch-buffer', but switches to it in the current window.
(interactive)
(doom/open-scratch-buffer t)) If passed the prefix arg, open project scratch buffer."
(interactive "P")
(doom/open-scratch-buffer t project-p))
;;;###autoload ;;;###autoload
(defun doom/open-project-scratch-buffer (&optional arg) (defun doom/open-project-scratch-buffer (&optional current-window)
"Opens the (persistent) project scratch buffer in a popup. "Opens the (persistent) project scratch buffer in a popup.
If passed the prefix ARG, switch to it in the current window." If passed the prefix arg, switch to it in the current window."
(interactive "P") (interactive "P")
(doom/open-scratch-buffer arg 'project)) (doom/open-scratch-buffer current-window 'project))
;;;###autoload ;;;###autoload
(defun doom/switch-to-project-scratch-buffer () (defun doom/switch-to-project-scratch-buffer ()