Ensure workspace in insertion order

Closes #2488
Fixes #2487
This commit is contained in:
Henrik Lissner 2020-02-06 13:39:21 -05:00
parent 450eed7268
commit 5eeb362610
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 11 additions and 7 deletions

View file

@ -68,13 +68,14 @@ error if NAME doesn't exist."
"Return a list of workspace structs (satisifes `+workspace-p')."
;; We don't use `hash-table-values' because it doesn't ensure order in older
;; versions of Emacs
(cdr (cl-loop for persp being the hash-values of *persp-hash*
collect persp)))
(cl-loop for name in persp-names-cache
if (gethash name *persp-hash*)
collect it))
;;;###autoload
(defun +workspace-list-names ()
"Return the list of names of open workspaces."
(mapcar #'safe-persp-name (+workspace-list)))
persp-names-cache)
;;;###autoload
(defun +workspace-buffer-list (&optional persp)