emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue: compare-strings


From: Stephen J. Turnbull
Subject: Issue: compare-strings
Date: Wed, 23 Dec 2009 12:32:55 +0900

Hi, Emacs.

We have the following report on xemacs-beta.  I would like a
clarification as to the intended behavior of `compare-strings' for
arguments out of range.  The behavior of Emacs makes more sense to me.
It seems silly to force users to check length of variable strings to
avoid errors in cases like

    (compare-strings "the other string is too short" "the" 0 9 0 9)

Marcus Harnisch writes:

 > `compare-strings', a primitive added in 21.5.9 mainly for GNU
 > compatibility as far as the ChangeLog says, is *not* compatible to the
 > same function in Emacs 22.2.1 (Ubuntu 9.10 version). Not sure if they
 > changed `compare-strings's behavior since we added it.
 > 
 > We create an args out of range error when the positions don't seem to
 > make sense (e.g. END is beyond length of the string) -- GNU doesn't.
 > 
 > In any case, the behavior in such cases is not specified.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]