[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Syntax highlight (problem with 'concat)
From: |
Tim Johnson |
Subject: |
Syntax highlight (problem with 'concat) |
Date: |
Mon, 2 Jan 2006 18:34:26 -0900 |
User-agent: |
Mutt/1.4.2.1i |
Hello:
I'm attempting to create a derived mode for lisp using the example
from this URL:
http://www.emacswiki.org/cgi-bin/wiki/DerivedMode
;; Note the line in the code below where I use the 'concat form
;; This line does not provide the syntax highlighting that I desire.
;; However, the line above with the literal regexp string *does*
;; highlight correctly
;; Any hints on how to correct the usage of the 'concat form will
;; be greatly appreciated.
(define-derived-mode tj-lisp-mode lisp-mode "tj-lisp"
"Major Mode for extending standard lisp mode"
(defconst tj-lisp-user-keywords (regexp-opt '("print" "setq")))
(defconst tj-word-begin "\\b\\(")
(defconst tj-word-end "\\)\\b")
;;register keywords
(setq tj-lisp-font-lock-keywords
(list '("\\b\\(if\\|progn\\)\\b" . font-lock-loop-face)
'("\\b\\(print\\|setq\\)\\b" . font-lock-user-keyword-face)
;; good, line below is bad
;'((concat tj-word-begin tj-lisp-user-keywords tj-word-end) .
font-lock-user-keyword-face)
))
(font-lock-mode))
;; TIA
tj
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
- Syntax highlight (problem with 'concat),
Tim Johnson <=