*** empty log message ***
[bpt/emacs.git] / lisp / ielm.el
index 3858e49..2f2a986 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 1994 Free Software Foundation, Inc.
 
 ;; Author: David Smith <maa036@lancaster.ac.uk>
+;; Maintainer: FSF
 ;; Created: 25 Feb 1994
 ;; Keywords: lisp
 
@@ -34,7 +35,7 @@
 ;;
 ;;   (autoload 'ielm "ielm" "Start an inferior Emacs Lisp session" t)
 ;;
-;; For completion to work, the comint.el from FSF Emacs 19.23 is
+;; For completion to work, the comint.el from Emacs 19.23 is
 ;; required.  If you do not have it, or if you are running Lemacs,
 ;; also add the following code to your .emacs:
 ;;
@@ -93,6 +94,15 @@ such as `edebug-defun' to work with such inputs."
   :type 'hook
   :group 'ielm)
 
+(defvar * nil
+  "Most recent value evaluated in IELM.")
+
+(defvar ** nil
+  "Second-most-recent value evaluated in IELM.")
+
+(defvar *** nil
+  "Third-most-recent value evaluated in IELM.")
+  
 ;;; System variables
 
 (defvar ielm-working-buffer nil
@@ -100,11 +110,7 @@ such as `edebug-defun' to work with such inputs."
 This variable is buffer-local.")
 
 (defvar ielm-header 
-  (concat
-   "*** Welcome to IELM version "
-   (substring "$Revision: 1.10 $" 11 -2)
-   " ***  Type (describe-mode) for help.\n"
-   "IELM has ABSOLUTELY NO WARRANTY; type (describe-no-warranty) for details.\n")
+  "*** Welcome to IELM ***  Type (describe-mode) for help.\n"
   "Message to display when IELM is started.")
 
 (defvar ielm-map nil)
@@ -133,7 +139,9 @@ This variable is buffer-local.")
 (defvar ielm-font-lock-keywords
   (list 
    (cons (concat "^" (regexp-quote ielm-prompt)) 'font-lock-keyword-face)
-   '("\\(^\\*\\*\\*[^*]+\\*\\*\\*\\)\\(.*$\\)" (1 font-lock-comment-face) (2 font-lock-reference-face)))
+   '("\\(^\\*\\*\\*[^*]+\\*\\*\\*\\)\\(.*$\\)"
+     (1 font-lock-comment-face)
+     (2 font-lock-constant-face)))
   "Additional expressions to highlight in ielm buffers.")
        
 ;;; Completion stuff
@@ -226,6 +234,8 @@ simply inserts a newline."
          (newline-and-indent)))
     (newline)))
 
+(defvar ielm-input)
+
 (defun ielm-input-sender (proc input)
   ;; Just sets the variable ielm-input, which is in the scope of 
   ;; `ielm-send-input's call.
@@ -302,15 +312,15 @@ simply inserts a newline."
              (if (ielm-is-whitespace (substring ielm-string ielm-pos))
                  ;; need this awful let convolution to work around
                  ;; an Emacs bug involving local vbls and let binding
-                 (let ((:save :)
-                       (::save ::)
-                       (:::save :::))
+                 (let ((*save *)
+                       (**save **)
+                       (***save ***))
                    (save-excursion
                      (set-buffer ielm-working-buffer)
                      (condition-case err
-                         (let ((: :save)
-                               (:: ::save)
-                               (::: :::save)
+                         (let ((* *save)
+                               (** **save)
+                               (*** ***save)
                                (ielm-obuf (current-buffer)))
                            (setq ielm-result (eval ielm-form))
                            (setq ielm-wbuf (current-buffer))
@@ -346,10 +356,10 @@ simply inserts a newline."
                (if ielm-noisy (ding))
                (setq ielm-output (concat ielm-output "*** " ielm-error-type " ***  "))
                (setq ielm-output (concat ielm-output ielm-result)))
-           ;; There was no error, so shift the ::: values
-           (setq ::: ::)
-           (setq :: :)
-           (setq : ielm-result))
+           ;; There was no error, so shift the *** values
+           (setq *** **)
+           (setq ** *)
+           (setq * ielm-result))
          (setq ielm-output (concat ielm-output "\n"))))
     (setq ielm-output (concat ielm-output ielm-prompt))
     (comint-output-filter (ielm-process) ielm-output)))
@@ -387,7 +397,7 @@ Uses the interface provided by `comint-mode' (which see).
 * \\[comint-dynamic-complete] completes Lisp symbols (or filenames, within strings), 
   or indents the line if there is nothing to complete.
 
-During evaluations, the values of the variables `:', `::', and `:::'
+During evaluations, the values of the variables `*', `**', and `***'
 are the results of the previous, second previous and third previous
 evaluations respectively.
 
@@ -437,12 +447,12 @@ Customised bindings may be defined in `ielm-map', which currently contains:
   (setq fill-paragraph-function 'lisp-fill-paragraph)
 
   ;; Value holders
-  (setq : nil)
-  (make-local-variable ':)
-  (setq :: nil)
-  (make-local-variable '::)
-  (setq ::: nil)
-  (make-local-variable ':::)
+  (setq * nil)
+  (make-local-variable '*)
+  (setq ** nil)
+  (make-local-variable '**)
+  (setq *** nil)
+  (make-local-variable '***)
 
   ;; font-lock support
   (make-local-variable 'font-lock-defaults)
@@ -487,4 +497,6 @@ Switches to the buffer `*ielm*', or creates it if it does not exist."
       (inferior-emacs-lisp-mode)))
   (pop-to-buffer "*ielm*"))
 
+(provide 'ielm)
+
 ;;; ielm.el ends here