bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#22819: 25.0.91; Don't try to indent region if the buffer is read-onl


From: Eli Zaretskii
Subject: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only
Date: Sat, 05 Aug 2017 09:52:59 +0300

> From: npostavs@users.sourceforge.net
> Date: Fri, 04 Aug 2017 21:56:11 -0400
> Cc: 22819@debbugs.gnu.org
> 
> Kaushal Modi <kaushal.modi@gmail.com> writes:
> 
> > The current behavior of indent-region function is that it will first indent
> > the buffer and then throw an error at the end that it couldn't apply the
> > indentation. Instead the below patch checks if the buffer if read-only
> > first before trying to indent.
> 
> I wonder if someone will complain that they were relying on this
> behaviour to check indentation in read-only buffers (currently if the
> indentation is already correct there is no error).

The original submission provided no rationale for the change, so it's
hard to reason about its advantages.  The clear disadvantage is that
this goes against veteran Emacs behavior regarding read-only text,
behavior that is present in several other commands, and that AFAIR
resulted from some past discussions.

If the rationale is user surprise, then I'd suggest to leave the
current behavior unchanged.





reply via email to

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