aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--evil-commands.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/evil-commands.el b/evil-commands.el
index 6bd90af..21a2527 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."