From: fork <forkandwait@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Generic mode -- keywords
Date: Mon, 29 Aug 2011 16:15:58 +0000 (UTC) [thread overview]
Message-ID: <loom.20110829T180807-598@post.gmane.org> (raw)
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
)
next reply other threads:[~2011-08-29 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 16:15 fork [this message]
2011-08-29 16:34 ` Generic mode -- keywords Drew Adams
2011-08-29 17:17 ` fork
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110829T180807-598@post.gmane.org \
--to=forkandwait@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.