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

From: Noam Postavsky <[email-masked]>
Date: Mon, 7 Aug 2017 14:11:38 -0400

On Mon, Aug 7, 2017 at 2:02 PM, Kaushal Modi <[email-masked]> wrote:
> On Mon, Aug 7, 2017 at 1:53 PM Noam Postavsky
> <[email-masked]> wrote:
>>
>> hmm, I can't reproduce here, but is it possible you have bound C-M-\
>> to some other command which calls indent-region non-interactively?
>
> This deviates from this bug report.. but I am open to suggestions on how I
> could retain the * property of the interactive form while setting the region
> boundaries as I do in the below advice.

Ah, well since you're replacing the interactive form, I suppose the
replacement should then make sure to check the read-only status as
well.

   (interactive (progn (barf-if-buffer-read-only) ...))