X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/938d65136b6d8c4ea91313216c873d2084be4240..6dc0bafd5915b01a341cc0efbc744abd73163872:/lisp/ielm.el diff --git a/lisp/ielm.el b/lisp/ielm.el index 37e66ccc61..dd02778b41 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -1,7 +1,6 @@ -;;; -*- lexical-binding: t -*- -;;; ielm.el --- interaction mode for Emacs Lisp +;;; ielm.el --- interaction mode for Emacs Lisp -*- lexical-binding: t -*- -;; Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2016 Free Software Foundation, Inc. ;; Author: David Smith ;; Maintainer: emacs-devel@gnu.org @@ -62,11 +61,11 @@ 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: -\(add-hook 'ielm-mode-hook +\(add-hook \\='ielm-mode-hook (lambda () - (define-key ielm-map \"\\C-w\" 'comint-kill-region) + (define-key ielm-map \"\\C-w\" \\='comint-kill-region) (define-key ielm-map [C-S-backspace] - 'comint-kill-whole-line))) + \\='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 @@ -217,7 +216,7 @@ This variable is buffer-local.") (defun ielm-indent-line nil "Indent the current line as Lisp code if it is not a prompt line." - (when (save-excursion (comint-bol) (bolp)) + (when (save-excursion (comint-bol t) (bolp)) (lisp-indent-line))) ;;; Working buffer manipulation @@ -380,7 +379,7 @@ nonempty, then flushes the buffer." (*3 ***) (active-process (ielm-process)) (old-standard-output standard-output) - new-standard-output + new-standard-output ielm-temp-buffer) (set-match-data ielm-match-data) (save-excursion @@ -511,7 +510,7 @@ evaluations respectively. If the working buffer is another IELM buffer, then the values in the working buffer are used. The variables `*1', `*2' and `*3', yield the process buffer values. -If, at the start of evaluation, `standard-output' is `t' (the +If, at the start of evaluation, `standard-output' is t (the default), `standard-output' is set to a special function that causes output to be directed to the ielm buffer. `standard-output' is restored after evaluation unless explicitly @@ -542,8 +541,8 @@ Customized bindings may be defined in `ielm-map', which currently contains: (set (make-local-variable 'completion-at-point-functions) '(comint-replace-by-expanded-history ielm-complete-filename elisp-completion-at-point)) - (setq-local eldoc-documentation-function - #'elisp-eldoc-documentation-function) + (add-function :before-until (local 'eldoc-documentation-function) + #'elisp-eldoc-documentation-function) (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only) (setq comint-get-old-input 'ielm-get-old-input) @@ -615,7 +614,7 @@ See `inferior-emacs-lisp-mode' for details." (with-current-buffer (get-buffer-create "*ielm*") (unless (zerop (buffer-size)) (setq old-point (point))) (inferior-emacs-lisp-mode))) - (switch-to-buffer "*ielm*") + (pop-to-buffer-same-window "*ielm*") (when old-point (push-mark old-point)))) (provide 'ielm)