aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
diff options
context:
space:
mode:
authorBozhidar Batsov <[email protected]>2017-05-07 08:02:20 +0300
committerBozhidar Batsov <[email protected]>2017-05-07 08:02:20 +0300
commitd92cf82c5f7e74ce22780f9fd1e390822948ef4d (patch)
treeab00eaedccd7e95dd72aa8214c8916680853cef6 /lib/tools
parenta637a8cf1fd8c7924a5dcdaaa8f8c14da6c44aab (diff)
downloadotp-d92cf82c5f7e74ce22780f9fd1e390822948ef4d.tar.gz
otp-d92cf82c5f7e74ce22780f9fd1e390822948ef4d.tar.bz2
otp-d92cf82c5f7e74ce22780f9fd1e390822948ef4d.zip
Make the erlang-shell prompt read-only by default
Allow for this behaviour to be customized via a defcustom.
Diffstat (limited to 'lib/tools')
-rw-r--r--lib/tools/emacs/erlang.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index 882531f9a9..7997ed43c9 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -5158,6 +5158,12 @@ future, a new shell on an already running host will be started."
(defvar erlang-shell-buffer-name "*erlang*"
"The name of the Erlang link shell buffer.")
+(defcustom erlang-shell-prompt-read-only t
+ "If non-nil, the prompt will be read-only.
+
+Also see the description of `ielm-prompt-read-only'."
+ :type 'boolean)
+
(defvar erlang-shell-mode-map nil
"Keymap used by Erlang shells.")
@@ -5201,6 +5207,8 @@ The following special commands are available:
;; Needed when compiling directly from the Erlang shell.
(setq compilation-last-buffer (current-buffer))
(setq comint-prompt-regexp "^[^>=]*> *")
+ (make-local-variable 'comint-prompt-read-only)
+ (setq comint-prompt-read-only erlang-shell-prompt-read-only)
(setq comint-eol-on-send t)
(setq comint-input-ignoredups t)
(setq comint-scroll-show-maximum-output t)