Function: ielm

ielm is an autoloaded, interactive and byte-compiled function defined in ielm.el.gz.

Signature

(ielm &optional BUF-NAME)

Documentation

Interactively evaluate Emacs Lisp expressions.

Switches to the buffer named BUF-NAME if provided (*ielm* by default), or creates it if it does not exist. See inferior-emacs-lisp-mode for details.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/ielm.el.gz
;;; User command

;;;###autoload
(defun ielm (&optional buf-name)
  "Interactively evaluate Emacs Lisp expressions.
Switches to the buffer named BUF-NAME if provided (`*ielm*' by default),
or creates it if it does not exist.
See `inferior-emacs-lisp-mode' for details."
  (interactive)
  (let (old-point
        (buf-name (or buf-name "*ielm*")))
    (unless (comint-check-proc buf-name)
      (with-current-buffer (get-buffer-create buf-name)
        (unless (zerop (buffer-size)) (setq old-point (point)))
        (inferior-emacs-lisp-mode)
        (setq-local trusted-content :all)))
    (pop-to-buffer-same-window buf-name)
    (when old-point (push-mark old-point))))