Subject: Re: bug#956: In CVS Emacs, replace-regexp doesn't honor inhibit-read-only.

From: Francis Litterio <[email-masked]>
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