emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits fu


From: Andreas Röhler
Subject: Re: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality
Date: Wed, 23 Mar 2016 19:53:55 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0



On 23.03.2016 18:55, Eli Zaretskii wrote:
Cc: address@hidden
From: Andreas Röhler <address@hidden>
Date: Wed, 23 Mar 2016 18:24:38 +0100

Isn't prog-widen the solution to those issues?
Hi Eli,

doku of prog-widen says

"This variable enables the major mode of the
main language to use the indentation engine of the sub-mode"

This also doesn't sound right.
Please read the description in the ELisp manual instead.

So let's read this (prog-widen):

"    ... to remove any restrictions
     imposed by the mode’s indentation engine and restore the
     restrictions recorded in ‘prog-indentation-context’.  This prevents
     the indentation engine of a sub-mode from inadvertently operating
     on text outside of the chunk it was supposed to indent, and
     preserves the restriction imposed by the superior mode.  When no
     superior mode is in effect, this function just calls ‘widen’.
"

Don't see in which way this should be better. It lays the burden of dealing with the mode in place into prog-mode. IMO wrong place, wrong direction.

Expect prog-mode do deliver very basic things common to all programming modes. Not dealing with and fixing special needs there.

Modes must meet the specific languages. Prog-mode must not be specific and not provide tools for storing things like indentation-context. Let the modes indent, fontify and jump around like they want - not thwarting their settings seems all needed here.




reply via email to

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