all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* comment delimiter in syntax table
@ 2003-06-04 13:35 carlos.conde
  2003-06-04 16:10 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: carlos.conde @ 2003-06-04 13:35 UTC (permalink / raw)


Hi all,

I'm writing a major mode for a script language and I need to declare in the 
syntax table the comment delimiters. However, these comment delimiters are
4 character long: "<*--" to start comment, "--*>" to end comment, and it 
seems that syntax table only accepts 2 char long comment delimiters (like
"/*" and "*/"). If I use font-lock methods, I can't have multi line comment
hilighting...

Is there a way to declare longer comment delimiters in the syntax table ??

thanks.

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

* Re: comment delimiter in syntax table
  2003-06-04 13:35 comment delimiter in syntax table carlos.conde
@ 2003-06-04 16:10 ` Stefan Monnier
  2003-06-04 21:07   ` carlos.conde
  2003-06-04 21:42   ` carlos.conde
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2003-06-04 16:10 UTC (permalink / raw)


>>>>> "carlos" == carlos conde <carlos.conde@double-c.fr> writes:
> Is there a way to declare longer comment delimiters in the syntax table ??

No.  The best solution right now is to use font-lock-syntactic-keywords:

  (defvar foo-font-lock-syntactic-keywords
    '(("\\(<\\)\\*--" (1 "<"))
      ("--\\*\\(>\\)" (1 ">"))))


-- Stefan

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

* Re: comment delimiter in syntax table
  2003-06-04 16:10 ` Stefan Monnier
@ 2003-06-04 21:07   ` carlos.conde
  2003-06-04 21:42   ` carlos.conde
  1 sibling, 0 replies; 4+ messages in thread
From: carlos.conde @ 2003-06-04 21:07 UTC (permalink / raw)


mmm ... sounds good ! I'll give it a try... thanks a lot for the tip !

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

* Re: comment delimiter in syntax table
  2003-06-04 16:10 ` Stefan Monnier
  2003-06-04 21:07   ` carlos.conde
@ 2003-06-04 21:42   ` carlos.conde
  1 sibling, 0 replies; 4+ messages in thread
From: carlos.conde @ 2003-06-04 21:42 UTC (permalink / raw)


it works perfectly !! thanks, I've never knew that font-lock could do 
such things... I'll read the doc better now...

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

end of thread, other threads:[~2003-06-04 21:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-04 13:35 comment delimiter in syntax table carlos.conde
2003-06-04 16:10 ` Stefan Monnier
2003-06-04 21:07   ` carlos.conde
2003-06-04 21:42   ` carlos.conde

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.