aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sainty2025-06-29 18:23:22 +1200
committerPhil Sainty2025-06-29 18:23:30 +1200
commitee11917627113ec9bf9665e05a70dfac330271ad (patch)
tree1c51e659a8040e06bede54c521d89dd694349969
parente4c8ae9a3b6060d32f8cfdb7140da57461264335 (diff)
downloademacs-scratch/string-common-prefix.tar.gz
emacs-scratch/string-common-prefix.zip
-rw-r--r--doc/lispref/strings.texi2
-rw-r--r--lisp/subr.el3
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 0447b2262cd..ae77b4e3a2d 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -254,7 +254,7 @@ properties removed.
254This function returns the longest initial substring common to all 254This function returns the longest initial substring common to all
255members of @var{collection}. It returns an empty string if there is no 255members of @var{collection}. It returns an empty string if there is no
256common prefix or if @var{collection} is @code{nil}. If @var{collection} 256common prefix or if @var{collection} is @code{nil}. If @var{collection}
257contains exactly one string, it returns that string. 257contains (after filtering) exactly one string, it returns that string.
258 258
259@example 259@example
260(string-common-prefix '("foobar" "foozot")) 260(string-common-prefix '("foobar" "foozot"))
diff --git a/lisp/subr.el b/lisp/subr.el
index 60ea8ca4148..68f9d6b37cc 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -6006,7 +6006,8 @@ attention to letter-case differences."
6006 "Return the longest common prefix from a COLLECTION of strings. 6006 "Return the longest common prefix from a COLLECTION of strings.
6007 6007
6008Return \"\" if there is no common prefix or if COLLECTION is nil. 6008Return \"\" if there is no common prefix or if COLLECTION is nil.
6009If COLLECTION contains exactly one string, return that string. 6009If COLLECTION contains (after filtering) exactly one string, return
6010that string.
6010 6011
6011If IGNORE-CASE is non-nil, letter case is ignored when matching the 6012If IGNORE-CASE is non-nil, letter case is ignored when matching the
6012substrings, but no guarantee is made about the letter-case of the return 6013substrings, but no guarantee is made about the letter-case of the return