Commit 9d42eea3 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(ielm-font-lock-keywords): New variable

(inferior-emacs-lisp-mode): Use it for font-lock support
parent 1d354180
...@@ -87,7 +87,7 @@ This variable is buffer-local.") ...@@ -87,7 +87,7 @@ This variable is buffer-local.")
(defvar ielm-header (defvar ielm-header
(concat (concat
"*** Welcome to IELM version " "*** Welcome to IELM version "
(substring "$Revision: 1.3 $" 11 -2) (substring "$Revision: 1.4 $" 11 -2)
" *** Type (describe-mode) for help.\n" " *** Type (describe-mode) for help.\n"
"IELM has ABSOLUTELY NO WARRANTY; type (describe-no-warranty) for details.\n") "IELM has ABSOLUTELY NO WARRANTY; type (describe-no-warranty) for details.\n")
"Message to display when IELM is started.") "Message to display when IELM is started.")
...@@ -116,6 +116,12 @@ This variable is buffer-local.") ...@@ -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-f" 'ielm-display-working-buffer)
(define-key ielm-map "\C-c\C-v" 'ielm-print-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 ;;; Completion stuff
(defun ielm-tab nil (defun ielm-tab nil
...@@ -417,6 +423,11 @@ Customised bindings may be defined in `ielm-map', which currently contains: ...@@ -417,6 +423,11 @@ Customised bindings may be defined in `ielm-map', which currently contains:
(setq ::: nil) (setq ::: nil)
(make-local-variable ':::) (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 ;; A dummy process to keep comint happy. It will never get any input
(if (comint-check-proc (current-buffer)) nil (if (comint-check-proc (current-buffer)) nil
(start-process "ielm" (current-buffer) "cat") (start-process "ielm" (current-buffer) "cat")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment