From d92cf82c5f7e74ce22780f9fd1e390822948ef4d Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 7 May 2017 08:02:20 +0300 Subject: Make the erlang-shell prompt read-only by default Allow for this behaviour to be customized via a defcustom. --- lib/tools/emacs/erlang.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- cgit v1.2.3