unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Syntax highlight (problem with 'concat)
@ 2006-01-03  3:34 Tim Johnson
  2006-01-03  3:43 ` Ian Zimmerman
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Johnson @ 2006-01-03  3:34 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-03 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-03  3:34 Syntax highlight (problem with 'concat) Tim Johnson
2006-01-03  3:43 ` Ian Zimmerman
2006-01-03  3:59   ` Tim Johnson
2006-01-03 18:09     ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).