1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/simple.el (shell-command): Raise a user-error instead of an error.

This commit is contained in:
Michael Albinus 2019-07-09 20:48:35 +02:00
parent 8c9fe44cdc
commit 1e4e165eaf

View file

@ -3628,12 +3628,12 @@ impose the use of a shell (with its need to quote arguments)."
;; If will kill a process, query first.
(if (yes-or-no-p "A command is running in the default buffer. Kill it? ")
(kill-process proc)
(error "Shell command in progress")))
(user-error "Shell command in progress")))
((eq async-shell-command-buffer 'confirm-new-buffer)
;; If will create a new buffer, query first.
(if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ")
(setq buffer (generate-new-buffer bname))
(error "Shell command in progress")))
(user-error "Shell command in progress")))
((eq async-shell-command-buffer 'new-buffer)
;; It will create a new buffer.
(setq buffer (generate-new-buffer bname)))
@ -3644,7 +3644,7 @@ impose the use of a shell (with its need to quote arguments)."
(with-current-buffer buffer
(rename-uniquely))
(setq buffer (get-buffer-create bname)))
(error "Shell command in progress")))
(user-error "Shell command in progress")))
((eq async-shell-command-buffer 'rename-buffer)
;; It will rename the buffer.
(with-current-buffer buffer