summaryrefslogtreecommitdiff
path: root/lisp/ielm.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-29 23:13:19 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-29 23:13:19 +0000
commit9d42eea392ff3009de2c23057982aaba9567dd56 (patch)
treeadc43fb83225ad001209602f75d71c26790747be /lisp/ielm.el
parent1d3541803d499fbad3b9c18633dcb51c5d9123c5 (diff)
downloademacs-9d42eea392ff3009de2c23057982aaba9567dd56.tar.gz
(ielm-font-lock-keywords): New variable
(inferior-emacs-lisp-mode): Use it for font-lock support
Diffstat (limited to 'lisp/ielm.el')
-rw-r--r--lisp/ielm.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ielm.el b/lisp/ielm.el
index b25bcbcd01a..d3d7459bcbc 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.3 $" 11 -2)
+ (substring "$Revision: 1.4 $" 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.")
@@ -116,6 +116,12 @@ This variable is buffer-local.")
(define-key ielm-map "\C-c\C-f" 'ielm-display-working-buffer)
(define-key ielm-map "\C-c\C-v" 'ielm-print-working-buffer))
+(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)))
+ "Additional expressions to highlight in ielm buffers.")
+
;;; Completion stuff
(defun ielm-tab nil
@@ -417,6 +423,11 @@ Customised bindings may be defined in `ielm-map', which currently contains:
(setq ::: nil)
(make-local-variable ':::)
+ ;; font-lock support
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults
+ '(ielm-font-lock-keywords nil nil ((?: . "w") (?- . "w") (?* . "w"))))
+
;; A dummy process to keep comint happy. It will never get any input
(if (comint-check-proc (current-buffer)) nil
(start-process "ielm" (current-buffer) "cat")