GNU bug report logs - #22819
25.0.91; Don't try to indent region if the buffer is read-only

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Fri, 26 Feb 2016 13:56:02 UTC

Severity: wishlist

Tags: patch, wontfix

Found in version 25.0.91

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 22819 <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>,
 Eli Zaretskii <eliz <at> gnu.org>
Cc: 22819 <at> debbugs.gnu.org
Subject: Re: bug#22819: 25.0.91;
 Don't try to indent region if the buffer is read-only
Date: Tue, 08 Aug 2017 13:06:52 +0000
[Message part 1 (text/plain, inline)]
On Mon, Aug 7, 2017 at 2:11 PM Noam Postavsky <
npostavs <at> users.sourceforge.net> wrote:

> 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) ...))
>

The advice gets tricky because I want to add barf-if-buffer-read-only only
if the original fn's interactive form had "*".

I am using the same advice fn for eval-region and indent-region.. so I
don't need the barf fn call for eval-region.

@Eli: Based on the discussion[1] on emacs-devel, there isn't any opposition
to doing what's proposed in this bug thread. So if it's alright by you, and
if there is no strong reason to use the more concise alternative i.e. if
both barf-if-buffer-read-only and interactive "*.." are equally correct,
can the former approach be committed?

Thanks.

[1]: http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00168.html
-- 

Kaushal Modi
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.