feature/workspaces: refactor +workspace-buffer-list

This commit is contained in:
Henrik Lissner 2018-02-10 02:16:50 -05:00
parent a43b88b18a
commit f2a4028f30
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -85,11 +85,13 @@ The buffer list is ordered by recency (same as `buffer-list').
PERSP can be a string (name of a workspace) or a workspace (satisfies
`+workspace-p'). If nil or omitted, it defaults to the current workspace."
(let ((persp (or persp (+workspace-current))))
(cl-assert (+workspace-p persp) t)
(cl-loop for buf in (buffer-list)
if (+workspace-contains-buffer-p buf persp)
collect buf)))
(unless persp
(setq persp (+workspace-current)))
(unless (+workspace-p persp)
(error "You're in the nil perspective"))
(cl-loop for buf in (buffer-list)
if (+workspace-contains-buffer-p buf persp)
collect buf))
;;;###autoload
(defun +workspace-orphaned-buffer-list ()