experimental mako-c-mumamo-mode fails to leave c-string-mode

Asked by Friedrich Delgado

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.

Question information

Language:
English Edit question
Status:
Answered
For:
nXhtml Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
lborgman (lennart-borgman) said :
#1

I converted this to a bug. It is better for keeping track of things. Please see Bug #718851.

Can you help with this problem?

Provide an answer of your own, or ask Friedrich Delgado for more information if necessary.

To post a message you must log in.