]> git.eshelyaron.com Git - emacs.git/commitdiff
save-buffers-kill-emacs: Adjust confirmation prompt when restarting
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 25 Oct 2024 04:43:23 +0000 (12:43 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Oct 2024 06:31:54 +0000 (08:31 +0200)
* lisp/files.el (save-buffers-kill-emacs): When restarting, ask
"Really restart Emacs?".

(cherry picked from commit df677f65fd1b4f0d16e59d5df9735139d2a667c8)

lisp/files.el

index 1186d1cc2c344ce1226d71eca576db9055211cce..bbf2ddf8c2d4d87cedbda7f614291645488881b0 100644 (file)
@@ -8560,7 +8560,8 @@ If RESTART, restart Emacs after killing the current Emacs process."
      ;; Query the user for other things, perhaps.
      (run-hook-with-args-until-failure 'kill-emacs-query-functions)
      (or (null confirm)
-         (funcall confirm "Really exit Emacs? "))
+         (funcall confirm (format "Really %s Emacs? "
+                                  (if restart "restart" "exit"))))
      (kill-emacs nil restart))))
 
 (defun save-buffers-kill-terminal (&optional arg)