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

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

[nongnu] elpa/evil 792e1d11f2: Add err-code arg to :cq ex command


From: ELPA Syncer
Subject: [nongnu] elpa/evil 792e1d11f2: Add err-code arg to :cq ex command
Date: Tue, 2 Jan 2024 18:59:28 -0500 (EST)

branch: elpa/evil
commit 792e1d11f26b9dd7aa047d66671f38192cdace03
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <tom_dl@hotmail.com>

    Add err-code arg to :cq ex command
---
 evil-commands.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index 6bd90af06a..21a2527cae 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -3474,15 +3474,15 @@ is closed."
           (set-process-query-on-exit-flag process nil))
         (kill-emacs)))))
 
-(evil-define-command evil-quit-all-with-error-code (&optional _force)
+(evil-define-command evil-quit-all-with-error-code (&optional err-code _force)
   "Exit Emacs without saving, returning an non-zero error code.
 The FORCE argument is only there for compatibility and is ignored.
 This function fails with an error if Emacs is run in server mode."
   :repeat nil
-  (interactive "<!>")
+  (interactive "<N><!>")
   (if (bound-and-true-p server-buffer-clients)
-      (user-error "Cannot exit client process with error code.")
-    (kill-emacs 1)))
+      (user-error "Cannot exit client process with error code")
+    (kill-emacs (or err-code 1))))
 
 (evil-define-command evil-save-and-quit ()
   "Save all buffers and exit Emacs."



reply via email to

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