diff options
| author | Eli Zaretskii | 2018-04-28 10:27:53 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-04-28 10:27:53 +0300 |
| commit | a7a3918a16c85f89d797d48b09e751ab30e0f032 (patch) | |
| tree | a48809d67e91a60cbdb622f6a4145c8081d4bb1c /src | |
| parent | c6e6503900534d939dd94b812563c27f22c49b7d (diff) | |
| download | emacs-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -155,9 +155,11 @@ If STRING is multibyte, this may be greater than the length of STRING. */) | |||
| 155 | 155 | ||
| 156 | DEFUN ("string-distance", Fstring_distance, Sstring_distance, 2, 3, 0, | 156 | DEFUN ("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. |
| 158 | If BYTECOMPARE is nil, compare character of strings. | 158 | The distance is the number of deletions, insertions, and substitutions |
| 159 | If BYTECOMPARE is t, compare byte of strings. | 159 | required to transform STRING1 into STRING2. |
| 160 | Case is significant, but text properties are ignored. */) | 160 | If BYTECOMPARE is nil or omitted, compute distance in terms of characters. |
| 161 | If BYTECOMPARE is non-nil, compute distance in terms of bytes. | ||
| 162 | Letter-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 | { |