Merge pull request #981 from qleguennec/develop

feature/workspaces: Fix +workspace-delete to match docstring
This commit is contained in:
Henrik Lissner 2018-10-31 16:11:31 -04:00 committed by GitHub
commit 599c95e4a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,15 +172,17 @@ success, nil otherwise."
(persp-rename new-name (+workspace-get name))) (persp-rename new-name (+workspace-get name)))
;;;###autoload ;;;###autoload
(defun +workspace-delete (name &optional inhibit-kill-p) (defun +workspace-delete (workspace &optional inhibit-kill-p)
"Delete the workspace denoted by NAME, which can be the name of a perspective "Delete the workspace denoted by WORKSPACE, which can be the name of a perspective
or its hash table. If INHIBIT-KILL-P is non-nil, don't kill this workspace's or its hash table. If INHIBIT-KILL-P is non-nil, don't kill this workspace's
buffers." buffers."
(when (+workspace--protected-p name) (unless (stringp workspace)
(error "Can't delete '%s' workspace" name)) (setq workspace (persp-name workspace)))
(+workspace-get name) ; error checking (when (+workspace--protected-p workspace)
(persp-kill name inhibit-kill-p) (error "Can't delete '%s' workspace" workspace))
(not (+workspace-exists-p name))) (+workspace-get workspace) ; error checking
(persp-kill workspace inhibit-kill-p)
(not (+workspace-exists-p workspace)))
;;;###autoload ;;;###autoload
(defun +workspace-switch (name &optional auto-create-p) (defun +workspace-switch (name &optional auto-create-p)