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: Drew Adams
Subject: RE: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality
Date: Wed, 23 Mar 2016 14:57:49 -0700 (PDT)

> >> 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.

Worse yet -

What's a "sub-mode"?  The term is introduced nowhere in either the Emacs
manual or the Elisp manual.  It's not in the Elisp manual index.

It is used only in the node mentioned, and with no definition or
explanation.

That's a bug, IMO.  One might assume that it just means any major mode
that inherits from (i.e., derived from) `prog-mode' (since the term is
used only in the context of `prog-mode').  But one should not have to
assume.

And the text about indentation and the use of sub-mode for only a given
chunk of text in a buffer is incomprehensible without some explanation.
Normally, a major mode, no matter whether it is derived from some other
major mode, has its effect on the entire buffer.

It seems there is some non-negligible functionality/behavior/feature
that has not been documented.  Not up to Emacs standards, it appears.

It looks like someone perhaps implemented something and just tossed
some minimal doc into the manual, in the form of doc-string-like text
for a couple functions.  Insufficient.

Please explain what this is all about.



reply via email to

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