emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Do indent-region only on editable buffers


From: Noam Postavsky
Subject: Re: [RFC] Do indent-region only on editable buffers
Date: Mon, 7 Aug 2017 14:13:28 -0400

On Mon, Aug 7, 2017 at 1:46 PM, Drew Adams <address@hidden> wrote:
>> - Are there any objections to doing the buffer read-only check before
>>   doing the indent?
>
> Dunno what the right approach/solution is in this particular case.
>
> But note that we don't do what you suggest in general - we don't do it
> for most other editing operations: insert or delete a character, yank
> a string, kill the region,...  Instead, we let an error be raised,
> telling the user that the buffer is read-only.

The other commands you list finish pretty much instantaneously, so the
difference is somewhat academic there. Although yank has (interactive
"*P"), the star means the read-only check is at the beginning. So you
can't successfully yank the empty string into a read-only buffer.



reply via email to

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