emacs-devel
[Top][All Lists]
Advanced

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

Re: Lifting all buffer restrictions in indentation functions


From: Robert Weiner
Subject: Re: Lifting all buffer restrictions in indentation functions
Date: Fri, 8 Dec 2017 12:38:33 -0500

On Fri, Dec 8, 2017 at 11:51 AM, Eli Zaretskii <address@hidden> wrote:
Hi, Emacs.

The widen-less branch proposes to have indent-according-to-mode,
indent-for-tab-command, and indent-region call 'widen' before calling
indent-line-function.  This call is unconditional,

​You don't say in your message but I would assume that
a save-restriction is used automatically within these
tab commands so that after the indent command, the
restriction is restored and there is no need for callers
to wrap indent functions within a save-restriction.

So after these two calls:
​​

​​
    (narrow-to-region START END)
​​
    (indent-for-tab-command)

​the narrowed region would be nearly the same (except
for changes made by the tab command).  Is that correct?

If that is the case, then this seems much less problematic
than if it is not and I would defer to Stefan's thinking.

Bob


reply via email to

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