Easier creation of named workspaces

When a user tries to switch to a named workspace that doesn't exist,
creat it, instead of just failing.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
This commit is contained in:
Rudi Grinberg 2019-12-01 15:02:38 +07:00
parent 5baa1eb631
commit dd004dea79

View file

@ -318,9 +318,7 @@ end of the workspace list."
(error "No workspace at #%s" (1+ index)))
(+workspace-switch dest)))
((stringp index)
(unless (member index names)
(error "No workspace named %s" index))
(+workspace-switch index))
(+workspace-switch index t))
(t
(error "Not a valid index: %s" index)))
(unless (called-interactively-p 'interactive)