aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2018-04-28 10:27:53 +0300
committerEli Zaretskii2018-04-28 10:27:53 +0300
commita7a3918a16c85f89d797d48b09e751ab30e0f032 (patch)
treea48809d67e91a60cbdb622f6a4145c8081d4bb1c /src
parentc6e6503900534d939dd94b812563c27f22c49b7d (diff)
downloademacs-a7a3918a16c85f89d797d48b09e751ab30e0f032.tar.gz
emacs-a7a3918a16c85f89d797d48b09e751ab30e0f032.zip
Fix documentation and tests for 'string-distance'
* src/fns.c (Fstring_distance): Doc fix. * doc/lispref/strings.texi (Text Comparison): Document 'string-distance'. * etc/NEWS: Fix wording and mark as documented in the manuals. * test/src/fns-tests.el (test-string-distance): Move from subr-tests.el and rename.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fns.c b/src/fns.c
index 6e851c8555a..1d69f15b0ed 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -155,9 +155,11 @@ If STRING is multibyte, this may be greater than the length of STRING. */)
155 155
156DEFUN ("string-distance", Fstring_distance, Sstring_distance, 2, 3, 0, 156DEFUN ("string-distance", Fstring_distance, Sstring_distance, 2, 3, 0,
157 doc: /* Return Levenshtein distance between STRING1 and STRING2. 157 doc: /* Return Levenshtein distance between STRING1 and STRING2.
158If BYTECOMPARE is nil, compare character of strings. 158The distance is the number of deletions, insertions, and substitutions
159If BYTECOMPARE is t, compare byte of strings. 159required to transform STRING1 into STRING2.
160Case is significant, but text properties are ignored. */) 160If BYTECOMPARE is nil or omitted, compute distance in terms of characters.
161If BYTECOMPARE is non-nil, compute distance in terms of bytes.
162Letter-case is significant, but text properties are ignored. */)
161 (Lisp_Object string1, Lisp_Object string2, Lisp_Object bytecompare) 163 (Lisp_Object string1, Lisp_Object string2, Lisp_Object bytecompare)
162 164
163{ 165{