[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: web-mode.el
From: |
Lennart Borgman |
Subject: |
Re: web-mode.el |
Date: |
Sat, 16 Jun 2012 15:30:10 +0200 |
On Sat, Jun 16, 2012 at 3:19 PM, Dmitry Gutov <address@hidden> wrote:
> On 16.06.2012 5:43, Lennart Borgman wrote:
>>
>
> I was just arguing a general point. If your proposal was to be able to call
> various functions manually while lying to them or their callees, then go
> back to seeing the whole buffer "truly", this example doesn't apply.
I see. Yes, that was my proposal. I imagined something like I
mentioned in a previous example i. e.:
(with-chunks chunk-list
... here you lie...
)
>>> As an aside, this bit from the docstring sounds not very useful, maybe
>>> even
>>> harmful:
>>>
>>> "- However first non-empty line indentation in a chunk when going
>>> in is special if prev-prev chunk is on same mumamo-depth and
>>> have the same major mode. Then indent relative last non-empty
>>> line in prev-prev chunk."
>>
>>
>> Why do you think this is wrong?
>
>
> If mumamo-depth doesn't take into account nesting level of plain html tags,
> then this is going to be wrong when nesting levels are different.
>
> If it does take into account those, this shouldn't be a problem, but I still
> don't understand why you need this mechanic at all.
The reason you may need it is that for example chunks at a deeper
level may have html code in them. They may be writing html code.
MuMaMo tries to make it possible to fontify and indent this html code
separately then.
> js2-mode is doing things differently from most major modes: 1) it reads all
> buffer contents, scanning through every buffer character one by one while
> parsing, 2) its fontification is all manual, performed by setting
> 'font-lock-face and 'syntax-table text properties during parsing.
> And parsing is scheduled directly from after-change-functions, not through
> jit-lock.
That is because it is a full parser. I think we will see more such
examples now that CEDET is finally inside Emacs.
>>> I have yet to look into using nxml as primary mode. Do you have any
>>> suggestions how that could be made easier?
>>
>>
>> There are such multi major modes in nXhtml. However they does not
>> always behave as I expected.
>
>
> I was asking specifically about nxml, because my initial attempt to make it
> work with erb-style tags in mmm-mode had failed.
Yes, I was trying to answer that. The reason it fails is because
nxml-mode (like js2-mode) contains a full parser. I have been thinking
that rewriting it is very difficult, but maybe Stefan's proposal (the
change to "syntax-ppss") is a rather easy road.
- Re: web-mode.el, (continued)
Re: web-mode.el, Dmitry Gutov, 2012/06/14
- Re: web-mode.el, Lennart Borgman, 2012/06/14
- Re: web-mode.el, Dmitry Gutov, 2012/06/14
- Re: web-mode.el, Lennart Borgman, 2012/06/15
- Re: web-mode.el, Dmitry Gutov, 2012/06/16
- Re: web-mode.el,
Lennart Borgman <=
- Re: web-mode.el, Dmitry Gutov, 2012/06/18
- Re: web-mode.el, Lennart Borgman, 2012/06/18
- Re: web-mode.el, Dmitry Gutov, 2012/06/19
Re: web-mode.el, Stefan Monnier, 2012/06/14
- Re: web-mode.el, Dmitry Gutov, 2012/06/14
- Re: web-mode.el, Stefan Monnier, 2012/06/16
- Re: web-mode.el, Lennart Borgman, 2012/06/16
- Re: web-mode.el, Dmitry Gutov, 2012/06/16
- Re: web-mode.el, Lennart Borgman, 2012/06/16
- Re: web-mode.el, Stefan Monnier, 2012/06/17