emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor 1d34c65 047/140: Use user-error when appropria


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor 1d34c65 047/140: Use user-error when appropriate
Date: Fri, 6 Aug 2021 12:51:17 -0400 (EDT)

branch: elpa/with-editor
commit 1d34c65ee86df7e0428ede61ae4f7b40bc0da823
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Use user-error when appropriate
    
    ...instead of `error' or `message'.
---
 with-editor.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/with-editor.el b/with-editor.el
index 563f17b..542ee0b 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -370,7 +370,7 @@ used when reading a filename in the minibuffer.")
   ;; either `with-editor-finish' or `with-editor-cancel',
   ;; and from removing the key bindings for these commands.
   (unless with-editor-mode
-    (error "With-Editor mode cannot be turned off"))
+    (user-error "With-Editor mode cannot be turned off"))
   (add-hook 'kill-buffer-query-functions
             'with-editor-kill-buffer-noop nil t)
   ;; `server-execute' displays a message which is not
@@ -381,7 +381,7 @@ used when reading a filename in the minibuffer.")
 (put 'with-editor-mode 'permanent-local t)
 
 (defun with-editor-kill-buffer-noop ()
-  (message (substitute-command-keys "\
+  (user-error (substitute-command-keys "\
 Don't kill this buffer.  Instead cancel using \\[with-editor-cancel]")))
 
 (defun with-editor-usage-message ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]