summaryrefslogtreecommitdiff
path: root/lisp/ielm.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-03-12 18:34:57 +0000
committerRichard M. Stallman <rms@gnu.org>1995-03-12 18:34:57 +0000
commit1184030bc6b818d19fb44b1b691440871cb4075b (patch)
tree27d02f6ca06cd8eb5178237464f15abc72c18587 /lisp/ielm.el
parenteacb1e0b09ce6a83d956ec0f08ba449e68b1be69 (diff)
downloademacs-1184030bc6b818d19fb44b1b691440871cb4075b.tar.gz
(ielm): Use pop-to-buffer.
(same-window-buffer-names): Add *ielm*.
Diffstat (limited to 'lisp/ielm.el')
-rw-r--r--lisp/ielm.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/ielm.el b/lisp/ielm.el
index 3b625f6a64a..b25bcbcd01a 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -87,7 +87,7 @@ This variable is buffer-local.")
(defvar ielm-header
(concat
"*** Welcome to IELM version "
- (substring "$Revision: 1.2 $" 11 -2)
+ (substring "$Revision: 1.3 $" 11 -2)
" *** Type (describe-mode) for help.\n"
"IELM has ABSOLUTELY NO WARRANTY; type (describe-no-warranty) for details.\n")
"Message to display when IELM is started.")
@@ -441,15 +441,18 @@ Customised bindings may be defined in `ielm-map', which currently contains:
;;; User command
+;;;###autoload (add-hook 'same-window-buffer-names "*ielm*")
+
;;;###autoload
(defun ielm nil
"Interactively evaluate Emacs Lisp expressions.
-Switches to the buffer *ielm*, or creates it if it does not exist."
+Switches to the buffer `*ielm*', or creates it if it does not exist."
(interactive)
- (if (comint-check-proc "*ielm*") nil
- (progn
+ (if (comint-check-proc "*ielm*")
+ nil
+ (save-excursion
(set-buffer (get-buffer-create "*ielm*"))
(inferior-emacs-lisp-mode)))
- (switch-to-buffer "*ielm*"))
+ (pop-to-buffer "*ielm*"))
;;; ielm.el ends here