# HG changeset patch # User Richard M. Stallman # Date 795033297 0 # Node ID 54697b892d3a61a6bc300dfdd8ecd094b126a689 # Parent aa3f323f1dea3d67989489fcac08d715eb070e91 (ielm): Use pop-to-buffer. (same-window-buffer-names): Add *ielm*. diff -r aa3f323f1dea -r 54697b892d3a lisp/ielm.el --- a/lisp/ielm.el Sun Mar 12 18:33:29 1995 +0000 +++ b/lisp/ielm.el Sun Mar 12 18:34:57 1995 +0000 @@ -87,7 +87,7 @@ (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 @@ ;;; 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