>>>> "drv" == Didier Verna
<didier(a)xemacs.org> writes:
drv> Adrian Aichner wrote:
> replace-in-string implements an arbitrary limit bug that would
turn some
> guys in Redwood green with envy :-)
>
> The second r-i-s does NOT honor case-fold-search in (emacs-version) "XEmacs
> 21.4 (patch 9) \"Informed Management (RC1)\" [Lucid] (i586-pc-win32) of
Sat
> May 25 2002 on D5DC120J" "XEmacs 21.5 (beta7) \"broccoflower\"
[Lucid]
> (i586-pc-win32, Mule) of Sat Jul 06 2002 on D5DC120J"
> It does, however work correctly in "XEmacs 21.1 (patch 14)
\"Cuyahoga
> Valley\" [Lucid] (i386-pc-win32) of Mon May 21 2001 on D5DC120J"
>
> Who has the inside story?
drv> I think it's related to this ChangeLog entry:
drv> * subr.el (replace-in-string):
drv> Rewrite this function to avoid N^2 behavior with large strings --
drv> catastrophic with the new Windows selection code! (Apparently the
drv> author of this function didn't realize there was a fun
drv> replace-match that could make his life much easier, because we
drv> duplicated the entire logic. The new version is smaller, easier
drv> to understand, much more robust, and has extended features --
drv> those of replace-match.)
Seems like the re-writer did not realize a few things either :-)
drv> Given the size of the entry, and the tone it's written in,
drv> one does not find it difficult to figure out the author
drv> ..... :-)
drv> 2000-07-30 Ben Wing <ben(a)xemacs.org>
drv> The problem we have is that re-search-forward does not
drv> currently honor case-fold-search.
It does!
However, the use of (with-temp-buffer ...) for strings > 50 chars (42
I would understand, but 50, yuck!) in replace-in-string makes is use
the default-value of case-fold-search!
Didier, both of us seem to be fans of case-fold-search t, yes?
But hey, patcher will work for people who have it set to nil :-)
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/