unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Johnson <tim@johnsons-web.com>
Subject: Syntax highlight (problem with 'concat)
Date: Mon, 2 Jan 2006 18:34:26 -0900	[thread overview]
Message-ID: <20060103033426.GA1812@johnsons-web.com> (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

             reply	other threads:[~2006-01-03  3:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03  3:34 Tim Johnson [this message]
2006-01-03  3:43 ` Syntax highlight (problem with 'concat) Ian Zimmerman
2006-01-03  3:59   ` Tim Johnson
2006-01-03 18:09     ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060103033426.GA1812@johnsons-web.com \
    --to=tim@johnsons-web.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).