Use frame's buffer-predicate instead of doom/{next,previous}-buffer

doom/{next,previous}-buffer was implemented so that these commands could
skip over unreal buffers, and land us on either a real one or the
dashboard. Using the frame's buffer-predicate parameter accomplishes
exactly this, natively.
This commit is contained in:
Henrik Lissner 2018-02-01 19:01:49 -05:00
parent c9e8be1f60
commit 2989296521
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 27 additions and 26 deletions

View file

@ -48,6 +48,12 @@
"Return non-nil if buffer is in workspace (defaults to current workspace)."
(persp-contain-buffer-p buffer (or workspace (+workspace-current)) nil))
;;;###autoload
(defun +workspace-alien-buffer-p (buffer)
"Return non-nil if BUFFER isn't a member of the current workspace."
(and (get-buffer-window buffer)
(not (+workspace-contains-buffer-p buffer))))
;; --- Getters ----------------------------