← Back to team overview

nxhtml team mailing list archive

Re: [Question #141907]: mako-nhxtml-mumamo-mode doesn't indent correctly

 

Question #141907 on nXhtml changed:
https://answers.launchpad.net/nxhtml/+question/141907

lborgman proposed the following answer:
I would be glad for your help especially since you know Mako and I
don't, but please be aware that it is not very simple to fix this.

At the moment I have not even been trying to get the logic for indenting
Mako right. And I am not sure the available "building blocks" in nXhtml
for doing it is there yet.

Indentation is a quite difficult problem since it may require some kind
of parsing of the code to determine the desired indentation level. And
it does not get easier with code that mixes what Emacs thinks are major
modes. And on top of this Emacs does not yet have good basic functions
for writing support for multiple major modes. (And it is not trivial to
add this to Emacs and keep backward compatibility though I have ideas
for how to do it.)

If this did not scare you too much then please look in mumamo.el where
you can see how indentation is generally handled. Too see more specific
things please look in mumamo-chunks.el and mumamo-fun.el.

Some of the tricks for eRuby can perhaps be used for Mako, but mako is a
bit more complicated. Maybe a totally different road for indentation
should  be used for Mako.

-- 
You received this question notification because you are a member of
nXhtml, which is an answer contact for nXhtml.