The code that failed 21.4.13 did in effect the following (the names have
been changed to protect the innocent, or something like that):
(let ((buf1 (get-buffer-create "buf1"))
(buf2 (get-buffer-create "buf2")))
(set-buffer buf1)
(insert "This's not some text\n")
(set-buffer-modified-p nil)
(toggle-read-only 1)
(goto-char (point-min))
(re-search-forward "not " nil t)
(set-buffer buf2)
(insert "Please don't overwrite me, please!\n")
(goto-char (point-min))
(re-search-forward "foo" nil t)
(replace-match ""))
The second replace-match succeeded and that appears to be
fixed in 21.4 CVS. Whew.
Leaving aside the question of whether the last search match data
needs to save the buffer, I can possibly see the need for that, though
it breaks FSF compatibility. What is the logic behind not clearing it
after a failed search (other than that's the way Stallman wishes it
done)? Is there any possible use for stale match data after a failed
search? Somehow, I suspect not.
-sb (Please overwrite me, please!)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta