From: Glenn Morris Date: Thu, 22 Mar 2012 06:21:28 +0000 (-0700) Subject: Document string-prefix-p X-Git-Tag: emacs-pretest-24.0.05~80 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8f6ec5c01d213657dca733f58be5069cc7cf86a;p=emacs.git Document string-prefix-p * doc/lispref/strings.texi (Text Comparison): Mention string-prefix-p. * etc/NEWS: Belated entry. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 77468f562c6..1248ea15bcd 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2012-03-22 Glenn Morris + + * strings.texi (Text Comparison): Mention string-prefix-p. + 2012-03-21 Chong Yidong * display.texi (The Echo Area): Add xref to Output Streams. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 64d0986493a..7813283ade5 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -508,6 +508,13 @@ are used. @code{string-lessp} is another name for @code{string<}. @end defun +@defun string-prefix-p string1 string2 &optional ignore-case +This function returns non-@code{nil} if @var{string1} is a prefix of +@var{string2}; i.e., if @var{string2} starts with @var{string1}. If +the optional argument @var{ignore-case} is non-@code{nil}, the +comparison ignores case differences. +@end defun + @defun compare-strings string1 start1 end1 string2 start2 end2 &optional ignore-case This function compares the specified part of @var{string1} with the specified part of @var{string2}. The specified part of @var{string1} diff --git a/etc/NEWS b/etc/NEWS index de5b865a54b..6af54a1db11 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1547,6 +1547,10 @@ from multiple input maps. You can use this to make a keymap that inherits from multiple maps, eg: (set-keymap-parent newmap (make-composed-keymap othermap parent)) ++++ +** New function `string-prefix-p'. +(This was actually added in Emacs 23.2 but was not advertised at the time.) + +++ ** New reader macro ## that stands for the empty symbol. This means that the empty symbol can now be read back. Also, #: by itself