Mercurial > emacs
comparison src/fns.c @ 73926:21f6be2e8ecb
(Frandom, Flength, Fsafe_length, Fstring_bytes, Fstring_equal, Fcompare_strings,
Fstring_lessp, Fcopy_sequence, Fstring_make_unibyte): Fix typos in docstrings.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 12 Nov 2006 04:51:55 +0000 |
parents | d2a970fd4273 |
children | af64ed57e41e |
comparison
equal
deleted
inserted
replaced
73925:a248fe2d281f | 73926:21f6be2e8ecb |
---|---|
101 DEFUN ("random", Frandom, Srandom, 0, 1, 0, | 101 DEFUN ("random", Frandom, Srandom, 0, 1, 0, |
102 doc: /* Return a pseudo-random number. | 102 doc: /* Return a pseudo-random number. |
103 All integers representable in Lisp are equally likely. | 103 All integers representable in Lisp are equally likely. |
104 On most systems, this is 29 bits' worth. | 104 On most systems, this is 29 bits' worth. |
105 With positive integer argument N, return random number in interval [0,N). | 105 With positive integer argument N, return random number in interval [0,N). |
106 With argument t, set the random number seed from the current time and pid. */) | 106 With argument t, set the random number seed from the current time and pid. */) |
107 (n) | 107 (n) |
108 Lisp_Object n; | 108 Lisp_Object n; |
109 { | 109 { |
110 EMACS_INT val; | 110 EMACS_INT val; |
111 Lisp_Object lispy_val; | 111 Lisp_Object lispy_val; |
138 DEFUN ("length", Flength, Slength, 1, 1, 0, | 138 DEFUN ("length", Flength, Slength, 1, 1, 0, |
139 doc: /* Return the length of vector, list or string SEQUENCE. | 139 doc: /* Return the length of vector, list or string SEQUENCE. |
140 A byte-code function object is also allowed. | 140 A byte-code function object is also allowed. |
141 If the string contains multibyte characters, this is not necessarily | 141 If the string contains multibyte characters, this is not necessarily |
142 the number of bytes in the string; it is the number of characters. | 142 the number of bytes in the string; it is the number of characters. |
143 To get the number of bytes, use `string-bytes'. */) | 143 To get the number of bytes, use `string-bytes'. */) |
144 (sequence) | 144 (sequence) |
145 register Lisp_Object sequence; | 145 register Lisp_Object sequence; |
146 { | 146 { |
147 register Lisp_Object val; | 147 register Lisp_Object val; |
148 register int i; | 148 register int i; |
191 | 191 |
192 DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0, | 192 DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0, |
193 doc: /* Return the length of a list, but avoid error or infinite loop. | 193 doc: /* Return the length of a list, but avoid error or infinite loop. |
194 This function never gets an error. If LIST is not really a list, | 194 This function never gets an error. If LIST is not really a list, |
195 it returns 0. If LIST is circular, it returns a finite value | 195 it returns 0. If LIST is circular, it returns a finite value |
196 which is at least the number of distinct elements. */) | 196 which is at least the number of distinct elements. */) |
197 (list) | 197 (list) |
198 Lisp_Object list; | 198 Lisp_Object list; |
199 { | 199 { |
200 Lisp_Object tail, halftail, length; | 200 Lisp_Object tail, halftail, length; |
201 int len = 0; | 201 int len = 0; |
215 return length; | 215 return length; |
216 } | 216 } |
217 | 217 |
218 DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, | 218 DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, |
219 doc: /* Return the number of bytes in STRING. | 219 doc: /* Return the number of bytes in STRING. |
220 If STRING is a multibyte string, this is greater than the length of STRING. */) | 220 If STRING is a multibyte string, this is greater than the length of STRING. */) |
221 (string) | 221 (string) |
222 Lisp_Object string; | 222 Lisp_Object string; |
223 { | 223 { |
224 CHECK_STRING (string); | 224 CHECK_STRING (string); |
225 return make_number (SBYTES (string)); | 225 return make_number (SBYTES (string)); |
226 } | 226 } |
227 | 227 |
228 DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, | 228 DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, |
229 doc: /* Return t if two strings have identical contents. | 229 doc: /* Return t if two strings have identical contents. |
230 Case is significant, but text properties are ignored. | 230 Case is significant, but text properties are ignored. |
231 Symbols are also allowed; their print names are used instead. */) | 231 Symbols are also allowed; their print names are used instead. */) |
232 (s1, s2) | 232 (s1, s2) |
233 register Lisp_Object s1, s2; | 233 register Lisp_Object s1, s2; |
234 { | 234 { |
235 if (SYMBOLP (s1)) | 235 if (SYMBOLP (s1)) |
236 s1 = SYMBOL_NAME (s1); | 236 s1 = SYMBOL_NAME (s1); |
258 | 258 |
259 The value is t if the strings (or specified portions) match. | 259 The value is t if the strings (or specified portions) match. |
260 If string STR1 is less, the value is a negative number N; | 260 If string STR1 is less, the value is a negative number N; |
261 - 1 - N is the number of characters that match at the beginning. | 261 - 1 - N is the number of characters that match at the beginning. |
262 If string STR1 is greater, the value is a positive number N; | 262 If string STR1 is greater, the value is a positive number N; |
263 N - 1 is the number of characters that match at the beginning. */) | 263 N - 1 is the number of characters that match at the beginning. */) |
264 (str1, start1, end1, str2, start2, end2, ignore_case) | 264 (str1, start1, end1, str2, start2, end2, ignore_case) |
265 Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case; | 265 Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case; |
266 { | 266 { |
267 register int end1_char, end2_char; | 267 register int end1_char, end2_char; |
268 register int i1, i1_byte, i2, i2_byte; | 268 register int i1, i1_byte, i2, i2_byte; |
350 } | 350 } |
351 | 351 |
352 DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, | 352 DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, |
353 doc: /* Return t if first arg string is less than second in lexicographic order. | 353 doc: /* Return t if first arg string is less than second in lexicographic order. |
354 Case is significant. | 354 Case is significant. |
355 Symbols are also allowed; their print names are used instead. */) | 355 Symbols are also allowed; their print names are used instead. */) |
356 (s1, s2) | 356 (s1, s2) |
357 register Lisp_Object s1, s2; | 357 register Lisp_Object s1, s2; |
358 { | 358 { |
359 register int end; | 359 register int end; |
360 register int i1, i1_byte, i2, i2_byte; | 360 register int i1, i1_byte, i2, i2_byte; |
486 | 486 |
487 | 487 |
488 DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, | 488 DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, |
489 doc: /* Return a copy of a list, vector, string or char-table. | 489 doc: /* Return a copy of a list, vector, string or char-table. |
490 The elements of a list or vector are not copied; they are shared | 490 The elements of a list or vector are not copied; they are shared |
491 with the original. */) | 491 with the original. */) |
492 (arg) | 492 (arg) |
493 Lisp_Object arg; | 493 Lisp_Object arg; |
494 { | 494 { |
495 if (NILP (arg)) return arg; | 495 if (NILP (arg)) return arg; |
496 | 496 |
1107 1, 1, 0, | 1107 1, 1, 0, |
1108 doc: /* Return the unibyte equivalent of STRING. | 1108 doc: /* Return the unibyte equivalent of STRING. |
1109 Multibyte character codes are converted to unibyte according to | 1109 Multibyte character codes are converted to unibyte according to |
1110 `nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'. | 1110 `nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'. |
1111 If the lookup in the translation table fails, this function takes just | 1111 If the lookup in the translation table fails, this function takes just |
1112 the low 8 bits of each character. */) | 1112 the low 8 bits of each character. */) |
1113 (string) | 1113 (string) |
1114 Lisp_Object string; | 1114 Lisp_Object string; |
1115 { | 1115 { |
1116 CHECK_STRING (string); | 1116 CHECK_STRING (string); |
1117 | 1117 |