nxhtml team mailing list archive
-
nxhtml team
-
Mailing list archive
-
Message #00292
[Question #145355]: experimental mako-c-mumamo-mode fails to leave c-string-mode
New question #145355 on nXhtml:
https://answers.launchpad.net/nxhtml/+question/145355
Hi
I'm trying to edit mako templates which generate c sourcecode, which works much better with mumamo than with mmm-mako.el so far.
I use the following experimental mode (derived from the mako-html modes):
(define-mumamo-multi-major-mode mako-c-mumamo-mode
("Mako C Family" c-mode
(
mumamo-chunk-mako-one-line-comment
mumamo-chunk-mako-<%doc
mumamo-chunk-mako-<%include
mumamo-chunk-mako-<%inherit
mumamo-chunk-mako-<%namespace
mumamo-chunk-mako-<%page
;;mumamo-chunk-mako-<%def
;;mumamo-chunk-mako-<%call
;;mumamo-chunk-mako-<%text
mumamo-chunk-mako-<%
mumamo-chunk-mako-%
mumamo-chunk-mako$
mumamo-chunk-xml-pi
mumamo-chunk-inlined-style
mumamo-chunk-inlined-script
mumamo-chunk-style=
mumamo-chunk-onjs=
)))
But when I use a ${ ... } block inside a c-string, the font-locking stays in c-string mode afterwards.
Example (from https://github.com/TauPan/bdec/blob/master/bdec/templates/c/main.c#L25):
#include "${protocol.name |filename}.h"
static void usage(char* program)
{
the function protocol for main is rendered in string mode.
I admit I don't really know what I'm doing, as I simply changed nxhtml-mode in the define to c-mode, and it "just (almost) worked"[TM], and read some code in mumamo-fun.el, to figure out why it (almost) didn't, so I hope you can hit me a little with the cluebat here.
--
You received this question notification because you are a member of
nXhtml, which is an answer contact for nXhtml.