emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 19 Feb 2015 08:18:30 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I've also seen problems with narrowing, but maybe classfying them and adding
> some rules would turn out a useful result.

Could be.  But using `widen' is a simple solution to those problems
(until you bump into problematic cases like Rmail and Info where
`widen' ends up widening too much).

BTW, a good start might be for someone to sit down and design a sane
way for narrow and syntax-ppss to interact.  If that includes a cleanish
way to support multiple modes, then it's even better.

>>>> E.g. in latex-mode, a "\begin{verbatim}" has to go to column 0, no
>>>> matter what the context.
>>> Are there important cases like this where we can't "flip" the modes and
>>> consider latex the "primary" mode instead?
>> All this just to avoid passing LEFTMOST-COL?
> Not really. The leftmost-col avoidance scheme I described further on would
> deal with latex as submode just fine.

Still: why do you want to avoid LEFTMOST-COL at all?

> Rather, it's a general observation: flipping the modes can simplify
> things. For instance, whenever we talk about indentation in a submode being
> dependent on the previous chunks of that submode, but not the primary mode
> contents between then, it sounds like the roles should be reversed.

I don't see how that influences the usefulness (or not) for
LEFTMOST-COL.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]