Add doom-temp-buffer-p predicate function

This commit is contained in:
Henrik Lissner 2018-06-16 21:02:40 +02:00
parent 486019d853
commit bf44c1abcc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -75,7 +75,12 @@ If no project is active, return all buffers."
;;;###autoload ;;;###autoload
(defun doom-special-buffer-p (buf) (defun doom-special-buffer-p (buf)
"Returns non-nil if BUF's name starts and ends with an *." "Returns non-nil if BUF's name starts and ends with an *."
(string-match-p "^\\s-*\\*" (buffer-name buf))) (equal (substring (buffer-name buf) 0 1) "*"))
;;;###autoload
(defun doom-temp-buffer-p (buf)
"Returns non-nil if BUF is temporary."
(equal (substring (buffer-name buf) 0 2) " *"))
;;;###autoload ;;;###autoload
(defun doom-non-file-visiting-buffer-p (buf) (defun doom-non-file-visiting-buffer-p (buf)