Fix +workspace-get returning a non-nil null

persp-get-by-name will sometimes return the value of `persp-not-persp'
(by default this is the symbol :nil) rather than actual nil when a persp
doesn't exist.
This commit is contained in:
Henrik Lissner 2017-06-27 23:19:45 +02:00
parent 510e7116c8
commit 4c11377e18
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -41,7 +41,9 @@
"Returns a workspace (perspective hash table) named NAME."
(unless (equal name persp-nil-name)
(let ((persp (persp-get-by-name name)))
(unless (or persp noerror)
(when (and (not noerror)
(or (null persp)
(equal persp persp-not-persp)))
(error "%s is not an available workspace" name))
persp)))