emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multi-modes and widen (again), was: Re: forward-comment and syntax-ppss


From: Dmitry Gutov
Subject: multi-modes and widen (again), was: Re: forward-comment and syntax-ppss
Date: Wed, 29 Nov 2017 23:48:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Thunderbird/57.0

Hi Stefan,

I'm only now working on this. :-(

On 12/20/16 1:33 PM, Stefan Monnier wrote:

I really meant widen, though. Not sure what calling prog-widen in there
would mean, semantically, because according to the previous discussion
prog-narrowing was something a mixed-mode code would institute. But it's
down the call stack from indent-according-to-mode (via a mixed-mode aware
indent-line-function), not above it.

Indeed, but I meant "somewhere between a call to
indent-according-to-mode and the call to major-mode specific
indent-line-function".

The point is that the indent-line-function should not need to widen,
although maybe the buffer is not fully widened (depending on whether
the multi-mode system uses narrowing, maybe).

Yes, so, I've pushed a change like this into scratch/widen-less. It removes prog-widen, thus leaving prog-indentation-context too complex for the only remaining use it has left.

So I was thinking of replacing it with just a variable prog-first-column (and an accessor function for convenience). The CHUNKS (or, now ...REST) element will go away because nobody has found any practical use for it by now.

prog-first-column is definitely needed, though. After thinking on it for some time, I still haven't come up with a suitable replacement.

WDYT?

It is unfortunate that we're doing it this late in Emacs 26 development cycle, but if we agree on this change, it will be fairly small.



reply via email to

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