mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feature/workspaces: Fix +workspace-delete to match docstring
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user