core/autoload/buffers: remove workgroups2 references in doom-buffer-list + refactor
This commit is contained in:
parent
97a7194c36
commit
f8a634b3f9
1 changed files with 9 additions and 15 deletions
|
@ -61,21 +61,15 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
||||||
|
|
||||||
If PROJECT-P is non-nil, get all buffers associated with the current project in
|
If PROJECT-P is non-nil, get all buffers associated with the current project in
|
||||||
the current workspace."
|
the current workspace."
|
||||||
(let* ((buffers (cond ((and (featurep 'workgroups2) workgroups-mode)
|
(let ((buffers (if (and (featurep 'persp-mode) persp-mode)
|
||||||
(wg-workgroup-associated-buffers nil))
|
(persp-buffer-list-restricted)
|
||||||
((and (featurep 'persp-mode) persp-mode)
|
(buffer-list)))
|
||||||
(persp-buffer-list-restricted))
|
(project-root (and project-p (doom-project-root t))))
|
||||||
(t (buffer-list))))
|
(if project-root
|
||||||
(project-root (and project-p (doom-project-root t)))
|
(funcall (if (eq project-p 'not) 'cl-remove-if 'cl-remove-if-not)
|
||||||
(buffer-list (if project-root
|
(lambda (b) (projectile-project-buffer-p b project-root))
|
||||||
(funcall (if (eq project-p 'not) 'cl-remove-if 'cl-remove-if-not)
|
buffers)
|
||||||
(lambda (b) (projectile-project-buffer-p b project-root))
|
buffers)))
|
||||||
buffers)
|
|
||||||
buffers))
|
|
||||||
(fallback-buffer (doom-fallback-buffer)))
|
|
||||||
(unless (memq fallback-buffer buffer-list)
|
|
||||||
(nconc buffer-list (list (doom-fallback-buffer))))
|
|
||||||
buffer-list))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-real-buffers-list (&optional buffer-list)
|
(defun doom-real-buffers-list (&optional buffer-list)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue