From 4c11377e18bb2d05cbfa2c8362226f05b28f474b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 27 Jun 2017 23:19:45 +0200 Subject: [PATCH] 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. --- modules/feature/workspaces/autoload/workspaces.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/feature/workspaces/autoload/workspaces.el b/modules/feature/workspaces/autoload/workspaces.el index e142b81cb..bc061960a 100644 --- a/modules/feature/workspaces/autoload/workspaces.el +++ b/modules/feature/workspaces/autoload/workspaces.el @@ -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)))