GNU bug report logs - #956
In CVS Emacs, replace-regexp doesn't honor inhibit-read-only.

Previous Next

Package: emacs;

Reported by: Francis Litterio <flitterio <at> gmail.com>

Date: Wed, 10 Sep 2008 16:15:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 956 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Francis Litterio <flitterio <at> gmail.com>
To: 956 <at> debbugs.gnu.org
Cc: Chong Yidong <cyd <at> stupidchicken.com>
Subject: Re: bug#956: In CVS Emacs, replace-regexp doesn't honor inhibit-read-only.
Date: Wed, 10 Sep 2008 21:43:16 -0400
I wrote:

> In CVS Emacs, replace-regexp doesn't honor inhibit-read-only.  To
> reproduce, evaluate this form:
>
>    (let ((inhibit-read-only t))
>      (with-current-buffer (get-buffer-create "zzz")
>        (insert "fooxxxbar")
>        (replace-regexp "x+" "z" nil (point-min) (point-max))))

Of course, that should have been:

     (let ((inhibit-read-only t))
       (with-current-buffer (get-buffer-create "zzz")

         (toggle-read-only 1)  ;; Forgot this in my original report!

         (insert "fooxxxbar")
         (replace-regexp "x+" "z" nil (point-min) (point-max))))

Chong Yidong wrote:

> Thanks for spotting this.  I've checked in a fix.

Thanks!
--
Fran




This bug report was last modified 16 years and 314 days ago.

Previous Next


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