unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Useful syntax highlighting (font lock) in a mixed xml lua file
@ 2011-12-30 20:47 Timur Aydin
  2012-01-03 11:03 ` David Edmondson
  2012-01-03 17:11 ` Titus von der Malsburg
  0 siblings, 2 replies; 3+ messages in thread
From: Timur Aydin @ 2011-12-30 20:47 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I am working on an xml file that has an embedded CDATA section which 
contains lua source code. I am mostly working on the lua code and would 
like that code to be syntax highlighted by emacs. When I activate 
lua-mode, it understandably gets confused because of all the surrounding 
xml. When I activate xml-mode, the xml stuff is properly syntax 
highlighted, but the lua code in the CDATA section is uniformly colored 
plain text.

Is there a way to utilize font-lock mode in a sensible manner? I 
attempted to put the lua code in a separate file (script.lua) and then 
included it into the xml using DOCTYPE and ENTITY tags, but this didn't 
help, because I don't have any control over the software that parses 
this xml file. It isn't able to deal with extra xml tags.

So my only hope is to be able to tell emacs to font-lock a region 
bounded by a CDATA tag using lua-mode and to font-lock the rest using 
xml-mode. Is there a way to do this?

-- 
Timur Aydin



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

end of thread, other threads:[~2012-01-03 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-30 20:47 Useful syntax highlighting (font lock) in a mixed xml lua file Timur Aydin
2012-01-03 11:03 ` David Edmondson
2012-01-03 17:11 ` Titus von der Malsburg

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).