 
 ;;;###autoload
 (defvar doom-real-buffer-functions '()
-  "A list of predicate functions run to determine if a buffer is real. These
-functions are iterated over with one argument, the buffer in question. If any
-function returns non-nil, the procession stops and the buffer is qualified as
-real.")
+  "A list of predicate functions run to determine if a buffer is real, unlike
+`doom-unreal-buffer-functions'. They are passed one argument: the buffer to be
+tested.
+
+Should any of its function returns non-nil, the rest of the functions are
+ignored and the buffer is considered real.")
+
+;;;###autoload
+(defvar doom-unreal-buffer-functions
+  '(minibufferp doom-special-buffer-p doom-non-file-visiting-buffer-p)
+  "A list of predicate functions run to determine if a buffer is *not* real,
+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.")
 
 ;;;###autoload
 (defvar-local doom-real-buffer-p nil

      buffers)))

;;;###autoload
(defun doom-real-buffer-list (&optional buffer-list)
  "Return a list of buffers that satify `doom-real-buffer-p'."
  (cl-loop for buf in (or buffer-list (doom-buffer-list))


;;;###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:

  1. A non-nil value for the buffer-local value of the `doom-real-buffer-p'
     variable OR
  2. Any function in `doom-real-buffer-functions' returns non-nil OR
  3. None of the functions in `doom-unreal-buffer-functions' must return
     non-nil.

If BUFFER-OR-NAME is omitted or nil, the current buffer is tested."
  (when-let* ((buf (ignore-errors (window-normalize-buffer buffer-or-name))))
    (or (buffer-local-value 'doom-real-buffer-p buf)
        (run-hook-with-args-until-success 'doom-real-buffer-functions buf)
        (not (run-hook-with-args-until-success 'doom-unreal-buffer-functions buf)))))

;;;###autoload
(defun doom-buffers-in-mode (modes &optional buffer-list derived-p)
