Improve real-buffer function docstrings

This commit is contained in:
Henrik Lissner 2018-02-01 20:04:54 -05:00
parent 03a03853e4
commit 7b2bbb973a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -8,7 +8,9 @@
tested.
Should any of its function returns non-nil, the rest of the functions are
ignored and the buffer is considered real.")
ignored and the buffer is considered real.
See `doom-real-buffer-p' for more information.")
;;;###autoload
(defvar doom-unreal-buffer-functions
@ -18,11 +20,14 @@ unlike `doom-real-buffer-functions'. They are passed one argument: the buffer to
be tested.
Should any of these functions return non-nil, the rest of the functions are
ignored and the buffer is considered unreal.")
ignored and the buffer is considered unreal.
See `doom-real-buffer-p' for more information.")
;;;###autoload
(defvar-local doom-real-buffer-p nil
"If non-nil, this buffer should be considered real no matter what.")
"If non-nil, this buffer should be considered real no matter what. See
`doom-real-buffer-p' for more information.")
;;;###autoload
(defvar doom-fallback-buffer "*scratch*"
@ -84,8 +89,14 @@ If no project is active, return all buffers."
;;;###autoload
(defun doom-real-buffer-p (&optional buffer-or-name)
"Returns t if BUFFER-OR-NAME is a 'real' buffer. The criteria for a real
buffer is:
"Returns t if BUFFER-OR-NAME is a 'real' buffer.
A real buffer is a useful buffer; a first class citizen in Doom. Real ones
should get special treatment, because we will be spending most of our time in
them. Unreal ones should be low-profile and easy to cast aside, so we can focus
on real ones.
The exact criteria for a real buffer is:
1. A non-nil value for the buffer-local value of the `doom-real-buffer-p'
variable OR