diff options
| author | Lars Ingebrigtsen | 2019-08-22 17:57:07 -0700 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-08-22 17:57:07 -0700 |
| commit | d08f7c41241e78b88bc2aaaa2dd323ce7512ae94 (patch) | |
| tree | e000238422f6bf1edcd832f3d417867982748043 /lisp/shell.el | |
| parent | 18e9cb8f431e4b7520e99854b423c25d546335be (diff) | |
| download | emacs-d08f7c41241e78b88bc2aaaa2dd323ce7512ae94.tar.gz emacs-d08f7c41241e78b88bc2aaaa2dd323ce7512ae94.zip | |
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.
Diffstat (limited to 'lisp/shell.el')
| -rw-r--r-- | lisp/shell.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 2914d1d2c81..ba7515e7bad 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -553,6 +553,8 @@ Variables `comint-output-filter-functions', a hook, and | |||
| 553 | `comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output' | 553 | `comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output' |
| 554 | control whether input and output cause the window to scroll to the end of the | 554 | control whether input and output cause the window to scroll to the end of the |
| 555 | buffer." | 555 | buffer." |
| 556 | (when (called-interactively-p 'any) | ||
| 557 | (error "Can't be called interactively; did you mean `shell-script-mode' instead?")) | ||
| 556 | (setq comint-prompt-regexp shell-prompt-pattern) | 558 | (setq comint-prompt-regexp shell-prompt-pattern) |
| 557 | (shell-completion-vars) | 559 | (shell-completion-vars) |
| 558 | (setq-local paragraph-separate "\\'") | 560 | (setq-local paragraph-separate "\\'") |