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: Stefan Monnier
Subject: Re: Lifting all buffer restrictions in indentation functions
Date: Fri, 08 Dec 2017 12:03:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>   (save-excursion
          ^^^^^^^^^
          restriction
>     (narrow-to-region START END)
>     (indent-for-tab-command))

While such code might exist somewhere [tho most likely calling
indent-according-to-mode instead], the reasons why I think
breaking such code is the right thing are:
- it's very rare
- it should be easy to change this code so it works with the new (and
  the old) convention, by replacing (indent-according-to-mode) with
  (funcall indent-line-function).
- the reverse problem (i.e. where the restriction is currently obeyed
  while it shouldn't) is much more common.

IOW the change could introduce breakage, but in my opinion, it will
correct many more situations than it breaks, and those that it breaks
are easy to fix.


        Stefan




reply via email to

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