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

Signal an error on `M-x shell-mode'

* lisp/shell.el (shell-mode): This mode can't usefully be called
interactively (and is somewhat destructive, as it disables
`undo'), and it's usually confused with `shell-script-mode'
(bug#19812).  So signal an error if it's used interactively.
This commit is contained in:
Lars Ingebrigtsen 2019-08-22 17:57:07 -07:00
parent 18e9cb8f43
commit d08f7c4124

View file

@ -553,6 +553,8 @@ Variables `comint-output-filter-functions', a hook, and
`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output'
control whether input and output cause the window to scroll to the end of the
buffer."
(when (called-interactively-p 'any)
(error "Can't be called interactively; did you mean `shell-script-mode' instead?"))
(setq comint-prompt-regexp shell-prompt-pattern)
(shell-completion-vars)
(setq-local paragraph-separate "\\'")