[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: antlr-mode.el - need some support by python.el
From: |
Stefan Monnier |
Subject: |
Re: antlr-mode.el - need some support by python.el |
Date: |
Tue, 17 Feb 2015 19:00:59 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> This is exactly the difference between 5 (yours) and 4 (mine) below
I think we're misunderstanding each other.
> Actually not. In both cases, the submode provides the code.
> In 4, the sub mode provides a function to compute the initial parse
> state given the string / chunks. It can do that quite simply by
> inserting it/them into a temporary buffer and using a function which
> computes the syntactic context at the end of that buffer - most major
> mode already have such a function. In other words: the effort for the
> submode is small.
IIUC you're suggesting that the submode provides a function "get-state"
to the outer mode, and the outer mode calls this "get-state" with some
"previous-chunk-descriptor" (either buffer positions or a string)
on the previous chunk and then passes the result to the submode.
> In 5, they follow your idea:
[...]
> To me, that seems to be more work.
The only difference is that the submode doesn't provide "get-state" to
the outer mode, instead the outer mode provides the
"previous-chunk-descriptor" and the submode calls "get-state" on it if
it wants to.
> Performance-wise, this could be better in the literate programming use
> case, but not in my use case.
I think the two are pretty much identical.
>> In any case your patch looks good, feel free to install it.
> If I might come back to your offer from last month (concerning
> antlr-mode.el, actually) - it would be excellent if you could apply the
> prog-mode.el.patch to the Emacs repository...
OK, will do,
Stefan
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/05
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/05
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/06
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/06
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/13
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/13
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/16
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/16
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/17
- Re: antlr-mode.el - need some support by python.el,
Stefan Monnier <=
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/18
- Re: antlr-mode.el - need some support by python.el, Dmitry Gutov, 2015/02/17
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/18
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/18
- Re: antlr-mode.el - need some support by python.el, Dmitry Gutov, 2015/02/18
- RE: antlr-mode.el - need some support by python.el, Wedler, Christoph, 2015/02/18
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/18
- Re: antlr-mode.el - need some support by python.el, Dmitry Gutov, 2015/02/18
- Re: antlr-mode.el - need some support by python.el, Stefan Monnier, 2015/02/18
- Re: antlr-mode.el - need some support by python.el, Dmitry Gutov, 2015/02/18