all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Generic mode -- keywords
@ 2011-08-29 16:15 fork
  2011-08-29 16:34 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: fork @ 2011-08-29 16:15 UTC (permalink / raw)
  To: help-gnu-emacs

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 
)





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

end of thread, other threads:[~2011-08-29 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 16:15 Generic mode -- keywords fork
2011-08-29 16:34 ` Drew Adams
2011-08-29 17:17   ` fork

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.