From 115a8a89a3a0c6a89ebe22df0ef0928a701cb1f0 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Mon, 25 Jul 2022 20:58:07 +0200 Subject: [PATCH] =?UTF-8?q?Use=20user-error=20rather=20than=20=E2=80=98err?= =?UTF-8?q?or=E2=80=99=20in=20interactive=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipewire.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipewire.el b/pipewire.el index 0cefaf0..1b7b197 100644 --- a/pipewire.el +++ b/pipewire.el @@ -157,7 +157,7 @@ The indicator is displayed only on graphical terminals." (interactive) (when (and (not (eq major-mode 'pipewire-mode)) (not (equal (buffer-name) pipewire-buffer))) - (error "Not in a PipeWire buffer")) + (user-error "Not in a PipeWire buffer")) (pipewire-lib-refresh) (let ((inhibit-read-only t) (default-ids (mapcar #'cdr (pipewire-lib-default-nodes))) @@ -297,7 +297,7 @@ object. Otherwise apply it on the default audio sink." (let ((object (car (pipewire-lib-default-capture-ports)))) (if object (pipewire--update-muted object (pipewire-lib-toggle-mute object)) - (error "No default audio input")))) + (user-error "No default audio input")))) ;;;###autoload (defun pipewire-set-volume (volume &optional object single-p) @@ -392,7 +392,7 @@ Otherwise ask for the Node to set as the default Node." ;; Without this, ports of the device may not be displayed on the update: (sit-for 0) (pipewire--update)) - (error "Nothing to set a profile for here"))) + (user-error "Nothing to set a profile for here"))) (defun pipewire-properties () "Display properties of the object at the current point." @@ -406,7 +406,7 @@ Otherwise ask for the Node to set as the default Node." (insert (format "%s: %s\n" p (pipewire-lib-object-value object p))))) (goto-char (point-min)) (view-mode)) - (error "No PipeWire object here"))) + (user-error "No PipeWire object here"))) (defvar pipewire-mode-map (let ((map (make-sparse-keymap)))