Add doom-{visible,buried}-buffer-p predicates
This commit is contained in:
parent
0625bf87d6
commit
24b40824ce
1 changed files with 10 additions and 0 deletions
|
@ -97,6 +97,16 @@ If no project is active, return all buffers."
|
|||
"Returns non-nil if BUF is temporary."
|
||||
(equal (substring (buffer-name buf) 0 1) " "))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-visible-buffer-p (buf)
|
||||
"Return non-nil if BUF is visible."
|
||||
(get-buffer-window buf))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-buried-buffer-p (buf)
|
||||
"Return non-nil if BUF is not visible."
|
||||
(not (doom-visible-buffer-p buf)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-non-file-visiting-buffer-p (buf)
|
||||
"Returns non-nil if BUF does not have a value for `buffer-file-name'."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue