aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-02-14 12:52:00 +0100
committerLars Ingebrigtsen2021-02-14 12:58:20 +0100
commit8d517daf770e8c6bd05e040b3bd3402626dbd9ef (patch)
treec1a617f6dda60d9cecc546154a2fa7b84c68e2f2 /lisp/shell.el
parent43ecde85786ccbf4c07d535f08fd74c82a0af31b (diff)
downloademacs-8d517daf770e8c6bd05e040b3bd3402626dbd9ef.tar.gz
emacs-8d517daf770e8c6bd05e040b3bd3402626dbd9ef.zip
Fix how `shell-mode' avoids being called interactively
* lisp/shell.el (shell-mode): Make noninteractive instead of erroring out after being called.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 9238ad1e8a0..53f5d0b6f1c 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -556,8 +556,7 @@ Variables `comint-output-filter-functions', a hook, and
556`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output' 556`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output'
557control whether input and output cause the window to scroll to the end of the 557control whether input and output cause the window to scroll to the end of the
558buffer." 558buffer."
559 (when (called-interactively-p 'any) 559 :interactive nil
560 (error "Can't be called interactively; did you mean `shell-script-mode' instead?"))
561 (setq comint-prompt-regexp shell-prompt-pattern) 560 (setq comint-prompt-regexp shell-prompt-pattern)
562 (shell-completion-vars) 561 (shell-completion-vars)
563 (setq-local paragraph-separate "\\'") 562 (setq-local paragraph-separate "\\'")