[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Generic mode -- keywords
From: |
fork |
Subject: |
Generic mode -- keywords |
Date: |
Mon, 29 Aug 2011 16:15:58 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
I have written a generic mode for sas editing (ESS sucks and is WAY to big and
complex, sorry if I offend...).
Below [1] is a contrived example of that code, which basically highlights
comments, the keyword "and", and the funky SAS commenting style of "* blah;"
(asterix followed by semicolon with commented stuff in between):
When editing, if a defined keyword like "and" is contained in a "*;" type
comment, the mode doesn't highlight the *; comment, but as long as there is no
keyword, it works fine.
Is there a way to force the *; comment pattern to override the keyword behavior?
[1]:
(define-generic-mode 'simple-sas-mode
'(("/*" . "*/"))delimiters
'(
"and"
)
'(
("\\(\\*[^;\\*/]*;\\)" 1 'font-lock-comment-face)
)
; ... other stuff
)
- Generic mode -- keywords,
fork <=