unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: emacs-devel@gnu.org
Subject: Re: Issue: compare-strings
Date: Sat, 02 Jan 2010 03:21:42 +0900	[thread overview]
Message-ID: <87zl4xn0sp.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87iqbxrggw.fsf@uwakimon.sk.tsukuba.ac.jp>

I have synchronized XEmacs behavior to the behavior our bug report
describes, and Eli confirms is intended.  I've also changed the
docstring to one I consider more accurate.  As I have assign.future on
file for XEmacs, this is now copyright FSF, so you're welcome to use
it.  I suspect that the XEmacs docstring is the same as that of Emacs,
so the patch might even work.

diff -r 084056f46755 -r c45fdd4e1858 src/fns.c
--- a/src/fns.c	Fri Jan 01 00:21:07 2010 +0000
+++ b/src/fns.c	Sat Jan 02 01:02:43 2010 +0900
@@ -315,9 +315,12 @@
 Compare the contents of two strings, maybe ignoring case.
 In string STR1, skip the first START1 characters and stop at END1.
 In string STR2, skip the first START2 characters and stop at END2.
-END1 and END2 default to the full lengths of the respective strings.
-
-Case is significant in this comparison if IGNORE-CASE is nil.
+END1 and END2 default to the full lengths of the respective strings,
+and arguments that are outside the string (negative STARTi or ENDi
+greater than length) are coerced to 0 or string length as appropriate.
+
+Optional IGNORE-CASE non-nil means use case-insensitive comparison.
+Case is significant by default.
 
 The value is t if the strings (or specified portions) match.
 If string STR1 is less, the value is a negative number N;




      reply	other threads:[~2010-01-01 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <873a33fmd8.fsf@harnisch.dyndns.org>
2009-12-23  3:32 ` Issue: compare-strings Stephen J. Turnbull
2009-12-23  4:11   ` Eli Zaretskii
2009-12-23  9:08     ` David Kastrup
2009-12-23 13:02       ` Stephen J. Turnbull
2010-01-01 18:21         ` Stephen J. Turnbull [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zl4xn0sp.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).