;;
;; (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:
;;
: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
This variable is buffer-local.")
(defvar ielm-header
- (concat
- "*** Welcome to IELM version "
- (substring "$Revision: 1.11 $" 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)
(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
(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.
(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))
(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)))
* \\[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.
(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)
(inferior-emacs-lisp-mode)))
(pop-to-buffer "*ielm*"))
+(provide 'ielm)
+
;;; ielm.el ends here