21.5.28: replace-regexp-in-string with SUBEXP is broken

Ville Skyttä scop at xemacs.org
Sat Sep 22 05:50:46 EDT 2007


replace-regexp-in-string with SUBEXP in 21.5.28 is broken; for example the 
example given in the docstring fails.

What should happen according to the example:

   (replace-regexp-in-string "\\(foo\\).*\\'" "bar" " foo foo" nil nil 1)
   " bar foo"

In my 21.5.28:

   (replace-regexp-in-string "\\(foo\\).*\\'" "bar" " foo foo" nil nil 1)
   " bar"

Perhaps when Ben brought this in from GNU Emacs, he may have failed to notice 
that our `replace-match' API differs from GNU's regarding strings vs buffers 
and subexp and this is why thing go south.  Thoughts?

Attached is an addition to the test suite; untested though and I haven't 
touched the test suite earlier so a review is needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r-r-i-s-test.patch
Type: text/x-diff
Size: 573 bytes
Desc: not available
Url : http://lists.xemacs.org/pipermail/xemacs-beta/attachments/20070922/0ef275df/r-r-i-s-test.patch


More information about the XEmacs-Beta mailing list