fix: error -> user-error

This commit is contained in:
Pavel Korytov 2022-01-03 12:09:02 +03:00
parent 26179187bb
commit 42d5c44a1a

View file

@ -209,7 +209,7 @@ detail."
If MOVE is t, move the perspective instead." If MOVE is t, move the perspective instead."
(interactive) (interactive)
(when (and move (= 1 (hash-table-count (perspectives-hash)))) (when (and move (= 1 (hash-table-count (perspectives-hash))))
(error "Can't move the only workspace")) (user-error "Can't move the only workspace"))
(let* ((target-workspace (exwm-workspace--prompt-for-workspace)) (let* ((target-workspace (exwm-workspace--prompt-for-workspace))
(persp-name (persp-current-name)) (persp-name (persp-current-name))
(url (burly-windows-url)) (url (burly-windows-url))
@ -217,7 +217,7 @@ If MOVE is t, move the perspective instead."
(unless (= (cl-position target-workspace exwm-workspace--list) (unless (= (cl-position target-workspace exwm-workspace--list)
exwm-workspace-current-index) exwm-workspace-current-index)
(when (gethash persp-name (perspectives-hash target-workspace)) (when (gethash persp-name (perspectives-hash target-workspace))
(error "Perspective with name \"%s\" already exists on the target workspace" persp-name)) (user-error "Perspective with name \"%s\" already exists on the target workspace" persp-name))
(with-selected-frame target-workspace (with-selected-frame target-workspace
(with-perspective persp-name (with-perspective persp-name
(mapc #'persp-add-buffer buffers) (mapc #'persp-add-buffer buffers)