Variable: ielm-prompt-read-only

ielm-prompt-read-only is a customizable variable defined in ielm.el.gz.

Value

t

Documentation

If non-nil, the IELM prompt is read only.

The read only region includes the newline before the prompt. Setting this variable does not affect existing IELM runs. This works by setting the buffer-local value of comint-prompt-read-only. Setting that value directly affects new prompts in the current buffer.

If this option is enabled, then the safe way to temporarily override the read-only-ness of IELM prompts is to call comint-kill-whole-line or comint-kill-region with no narrowing in effect. This way you will be certain that none of the remaining prompts will be accidentally messed up. You may wish to put something like the following in your init file:

    (with-eval-after-load 'ielm
      (keymap-set ielm-map "C-w" 'comint-kill-region)
      (keymap-set ielm-map "C-S-<backspace>"
        'comint-kill-whole-line))

If you set comint-prompt-read-only to t, you might wish to use comint-mode-hook and comint-mode-map instead of ielm-mode-hook and ielm-map. That will affect all comint buffers, including IELM buffers. If you sometimes use IELM on text-only terminals or with emacs -nw, you might wish to use another binding for comint-kill-whole-line.

This variable was added, or its default value changed, in Emacs 22.1.

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/ielm.el.gz
(defcustom ielm-prompt-read-only t
  "If non-nil, the IELM prompt is read only.
The read only region includes the newline before the prompt.
Setting this variable does not affect existing IELM runs.
This works by setting the buffer-local value of `comint-prompt-read-only'.
Setting that value directly affects new prompts in the current buffer.

If this option is enabled, then the safe way to temporarily
override the read-only-ness of IELM prompts is to call
`comint-kill-whole-line' or `comint-kill-region' with no
narrowing in effect.  This way you will be certain that none of
the remaining prompts will be accidentally messed up.  You may
wish to put something like the following in your init file:

    (with-eval-after-load \\='ielm
      (keymap-set ielm-map \"C-w\" \\='comint-kill-region)
      (keymap-set ielm-map \"C-S-<backspace>\"
        \\='comint-kill-whole-line))

If you set `comint-prompt-read-only' to t, you might wish to use
`comint-mode-hook' and `comint-mode-map' instead of
`ielm-mode-hook' and `ielm-map'.  That will affect all comint
buffers, including IELM buffers.  If you sometimes use IELM on
text-only terminals or with `emacs -nw', you might wish to use
another binding for `comint-kill-whole-line'."
  :type 'boolean
  :version "22.1")