diff options
| author | Francesco Potortì | 2003-01-14 23:12:31 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2003-01-14 23:12:31 +0000 |
| commit | 91f78c999ebdb8c8d80829616ab57eb82e684fff (patch) | |
| tree | 9a621a15ce07b4c477646b779424d4ac99538cb7 /src | |
| parent | 292ddc31493df7571853b27b41f9e2c755ae0e1d (diff) | |
| download | emacs-91f78c999ebdb8c8d80829616ab57eb82e684fff.tar.gz emacs-91f78c999ebdb8c8d80829616ab57eb82e684fff.zip | |
(Fsubstring): Clarify doc string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 62 |
1 files changed, 31 insertions, 31 deletions
| @@ -202,7 +202,7 @@ which is at least the number of distinct elements. */) | |||
| 202 | return length; | 202 | return length; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, | 205 | DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, |
| 206 | doc: /* Return the number of bytes in STRING. | 206 | doc: /* Return the number of bytes in STRING. |
| 207 | If STRING is a multibyte string, this is greater than the length of STRING. */) | 207 | If STRING is a multibyte string, this is greater than the length of STRING. */) |
| 208 | (string) | 208 | (string) |
| @@ -1171,7 +1171,7 @@ Elements of ALIST that are not conses are also shared. */) | |||
| 1171 | DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0, | 1171 | DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0, |
| 1172 | doc: /* Return a substring of STRING, starting at index FROM and ending before TO. | 1172 | doc: /* Return a substring of STRING, starting at index FROM and ending before TO. |
| 1173 | TO may be nil or omitted; then the substring runs to the end of STRING. | 1173 | TO may be nil or omitted; then the substring runs to the end of STRING. |
| 1174 | If FROM or TO is negative, it counts from the end. | 1174 | FROM and TO start at 0. If either is negative, it counts from the end. |
| 1175 | 1175 | ||
| 1176 | This function allows vectors as well as strings. */) | 1176 | This function allows vectors as well as strings. */) |
| 1177 | (string, from, to) | 1177 | (string, from, to) |
| @@ -1929,7 +1929,7 @@ one of the properties on the list. */) | |||
| 1929 | Lisp_Object prop; | 1929 | Lisp_Object prop; |
| 1930 | { | 1930 | { |
| 1931 | Lisp_Object tail; | 1931 | Lisp_Object tail; |
| 1932 | 1932 | ||
| 1933 | for (tail = plist; | 1933 | for (tail = plist; |
| 1934 | CONSP (tail) && CONSP (XCDR (tail)); | 1934 | CONSP (tail) && CONSP (XCDR (tail)); |
| 1935 | tail = XCDR (XCDR (tail))) | 1935 | tail = XCDR (XCDR (tail))) |
| @@ -1945,7 +1945,7 @@ one of the properties on the list. */) | |||
| 1945 | 1945 | ||
| 1946 | if (!NILP (tail)) | 1946 | if (!NILP (tail)) |
| 1947 | wrong_type_argument (Qlistp, prop); | 1947 | wrong_type_argument (Qlistp, prop); |
| 1948 | 1948 | ||
| 1949 | return Qnil; | 1949 | return Qnil; |
| 1950 | } | 1950 | } |
| 1951 | 1951 | ||
| @@ -1983,7 +1983,7 @@ The PLIST is modified by side effects. */) | |||
| 1983 | Fsetcar (XCDR (tail), val); | 1983 | Fsetcar (XCDR (tail), val); |
| 1984 | return plist; | 1984 | return plist; |
| 1985 | } | 1985 | } |
| 1986 | 1986 | ||
| 1987 | prev = tail; | 1987 | prev = tail; |
| 1988 | QUIT; | 1988 | QUIT; |
| 1989 | } | 1989 | } |
| @@ -2018,7 +2018,7 @@ one of the properties on the list. */) | |||
| 2018 | Lisp_Object prop; | 2018 | Lisp_Object prop; |
| 2019 | { | 2019 | { |
| 2020 | Lisp_Object tail; | 2020 | Lisp_Object tail; |
| 2021 | 2021 | ||
| 2022 | for (tail = plist; | 2022 | for (tail = plist; |
| 2023 | CONSP (tail) && CONSP (XCDR (tail)); | 2023 | CONSP (tail) && CONSP (XCDR (tail)); |
| 2024 | tail = XCDR (XCDR (tail))) | 2024 | tail = XCDR (XCDR (tail))) |
| @@ -2031,7 +2031,7 @@ one of the properties on the list. */) | |||
| 2031 | 2031 | ||
| 2032 | if (!NILP (tail)) | 2032 | if (!NILP (tail)) |
| 2033 | wrong_type_argument (Qlistp, prop); | 2033 | wrong_type_argument (Qlistp, prop); |
| 2034 | 2034 | ||
| 2035 | return Qnil; | 2035 | return Qnil; |
| 2036 | } | 2036 | } |
| 2037 | 2037 | ||
| @@ -2059,7 +2059,7 @@ The PLIST is modified by side effects. */) | |||
| 2059 | Fsetcar (XCDR (tail), val); | 2059 | Fsetcar (XCDR (tail), val); |
| 2060 | return plist; | 2060 | return plist; |
| 2061 | } | 2061 | } |
| 2062 | 2062 | ||
| 2063 | prev = tail; | 2063 | prev = tail; |
| 2064 | QUIT; | 2064 | QUIT; |
| 2065 | } | 2065 | } |
| @@ -2194,7 +2194,7 @@ internal_equal (o1, o2, depth) | |||
| 2194 | case Lisp_Type_Limit: | 2194 | case Lisp_Type_Limit: |
| 2195 | break; | 2195 | break; |
| 2196 | } | 2196 | } |
| 2197 | 2197 | ||
| 2198 | return 0; | 2198 | return 0; |
| 2199 | } | 2199 | } |
| 2200 | 2200 | ||
| @@ -3137,7 +3137,7 @@ is nil, and `use-dialog-box' is non-nil. */) | |||
| 3137 | 3137 | ||
| 3138 | DEFUN ("load-average", Fload_average, Sload_average, 0, 1, 0, | 3138 | DEFUN ("load-average", Fload_average, Sload_average, 0, 1, 0, |
| 3139 | doc: /* Return list of 1 minute, 5 minute and 15 minute load averages. | 3139 | doc: /* Return list of 1 minute, 5 minute and 15 minute load averages. |
| 3140 | 3140 | ||
| 3141 | Each of the three load averages is multiplied by 100, then converted | 3141 | Each of the three load averages is multiplied by 100, then converted |
| 3142 | to integer. | 3142 | to integer. |
| 3143 | 3143 | ||
| @@ -3172,7 +3172,7 @@ extern Lisp_Object Vafter_load_alist; | |||
| 3172 | 3172 | ||
| 3173 | DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, | 3173 | DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, |
| 3174 | doc: /* Returns t if FEATURE is present in this Emacs. | 3174 | doc: /* Returns t if FEATURE is present in this Emacs. |
| 3175 | 3175 | ||
| 3176 | Use this to conditionalize execution of lisp code based on the | 3176 | Use this to conditionalize execution of lisp code based on the |
| 3177 | presence or absence of emacs or environment extensions. | 3177 | presence or absence of emacs or environment extensions. |
| 3178 | Use `provide' to declare that a feature is available. This function | 3178 | Use `provide' to declare that a feature is available. This function |
| @@ -3249,7 +3249,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */) | |||
| 3249 | CHECK_SYMBOL (feature); | 3249 | CHECK_SYMBOL (feature); |
| 3250 | 3250 | ||
| 3251 | tem = Fmemq (feature, Vfeatures); | 3251 | tem = Fmemq (feature, Vfeatures); |
| 3252 | 3252 | ||
| 3253 | if (NILP (tem)) | 3253 | if (NILP (tem)) |
| 3254 | { | 3254 | { |
| 3255 | int count = SPECPDL_INDEX (); | 3255 | int count = SPECPDL_INDEX (); |
| @@ -3262,7 +3262,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */) | |||
| 3262 | if (! NILP (Vpurify_flag)) | 3262 | if (! NILP (Vpurify_flag)) |
| 3263 | error ("(require %s) while preparing to dump", | 3263 | error ("(require %s) while preparing to dump", |
| 3264 | SDATA (SYMBOL_NAME (feature))); | 3264 | SDATA (SYMBOL_NAME (feature))); |
| 3265 | 3265 | ||
| 3266 | /* A certain amount of recursive `require' is legitimate, | 3266 | /* A certain amount of recursive `require' is legitimate, |
| 3267 | but if we require the same feature recursively 3 times, | 3267 | but if we require the same feature recursively 3 times, |
| 3268 | signal an error. */ | 3268 | signal an error. */ |
| @@ -4709,7 +4709,7 @@ sweep_weak_hash_tables () | |||
| 4709 | { | 4709 | { |
| 4710 | h = XHASH_TABLE (table); | 4710 | h = XHASH_TABLE (table); |
| 4711 | next = h->next_weak; | 4711 | next = h->next_weak; |
| 4712 | 4712 | ||
| 4713 | if (h->size & ARRAY_MARK_FLAG) | 4713 | if (h->size & ARRAY_MARK_FLAG) |
| 4714 | { | 4714 | { |
| 4715 | /* TABLE is marked as used. Sweep its contents. */ | 4715 | /* TABLE is marked as used. Sweep its contents. */ |
| @@ -4922,7 +4922,7 @@ DEFUN ("sxhash", Fsxhash, Ssxhash, 1, 1, 0, | |||
| 4922 | 4922 | ||
| 4923 | DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, | 4923 | DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, |
| 4924 | doc: /* Create and return a new hash table. | 4924 | doc: /* Create and return a new hash table. |
| 4925 | 4925 | ||
| 4926 | Arguments are specified as keyword/argument pairs. The following | 4926 | Arguments are specified as keyword/argument pairs. The following |
| 4927 | arguments are defined: | 4927 | arguments are defined: |
| 4928 | 4928 | ||
| @@ -5197,7 +5197,7 @@ FUNCTION is called with 2 arguments KEY and VALUE. */) | |||
| 5197 | DEFUN ("define-hash-table-test", Fdefine_hash_table_test, | 5197 | DEFUN ("define-hash-table-test", Fdefine_hash_table_test, |
| 5198 | Sdefine_hash_table_test, 3, 3, 0, | 5198 | Sdefine_hash_table_test, 3, 3, 0, |
| 5199 | doc: /* Define a new hash table test with name NAME, a symbol. | 5199 | doc: /* Define a new hash table test with name NAME, a symbol. |
| 5200 | 5200 | ||
| 5201 | In hash tables created with NAME specified as test, use TEST to | 5201 | In hash tables created with NAME specified as test, use TEST to |
| 5202 | compare keys, and HASH for computing hash codes of keys. | 5202 | compare keys, and HASH for computing hash codes of keys. |
| 5203 | 5203 | ||
| @@ -5223,7 +5223,7 @@ including negative integers. */) | |||
| 5223 | 5223 | ||
| 5224 | DEFUN ("md5", Fmd5, Smd5, 1, 5, 0, | 5224 | DEFUN ("md5", Fmd5, Smd5, 1, 5, 0, |
| 5225 | doc: /* Return MD5 message digest of OBJECT, a buffer or string. | 5225 | doc: /* Return MD5 message digest of OBJECT, a buffer or string. |
| 5226 | 5226 | ||
| 5227 | A message digest is a cryptographic checksum of a document, and the | 5227 | A message digest is a cryptographic checksum of a document, and the |
| 5228 | algorithm to calculate it is defined in RFC 1321. | 5228 | algorithm to calculate it is defined in RFC 1321. |
| 5229 | 5229 | ||
| @@ -5271,14 +5271,14 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5271 | if (STRING_MULTIBYTE (object)) | 5271 | if (STRING_MULTIBYTE (object)) |
| 5272 | /* use default, we can't guess correct value */ | 5272 | /* use default, we can't guess correct value */ |
| 5273 | coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list)); | 5273 | coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list)); |
| 5274 | else | 5274 | else |
| 5275 | coding_system = Qraw_text; | 5275 | coding_system = Qraw_text; |
| 5276 | } | 5276 | } |
| 5277 | 5277 | ||
| 5278 | if (NILP (Fcoding_system_p (coding_system))) | 5278 | if (NILP (Fcoding_system_p (coding_system))) |
| 5279 | { | 5279 | { |
| 5280 | /* Invalid coding system. */ | 5280 | /* Invalid coding system. */ |
| 5281 | 5281 | ||
| 5282 | if (!NILP (noerror)) | 5282 | if (!NILP (noerror)) |
| 5283 | coding_system = Qraw_text; | 5283 | coding_system = Qraw_text; |
| 5284 | else | 5284 | else |
| @@ -5312,15 +5312,15 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5312 | else | 5312 | else |
| 5313 | { | 5313 | { |
| 5314 | CHECK_NUMBER (end); | 5314 | CHECK_NUMBER (end); |
| 5315 | 5315 | ||
| 5316 | end_char = XINT (end); | 5316 | end_char = XINT (end); |
| 5317 | 5317 | ||
| 5318 | if (end_char < 0) | 5318 | if (end_char < 0) |
| 5319 | end_char += size; | 5319 | end_char += size; |
| 5320 | 5320 | ||
| 5321 | end_byte = string_char_to_byte (object, end_char); | 5321 | end_byte = string_char_to_byte (object, end_char); |
| 5322 | } | 5322 | } |
| 5323 | 5323 | ||
| 5324 | if (!(0 <= start_char && start_char <= end_char && end_char <= size)) | 5324 | if (!(0 <= start_char && start_char <= end_char && end_char <= size)) |
| 5325 | args_out_of_range_3 (object, make_number (start_char), | 5325 | args_out_of_range_3 (object, make_number (start_char), |
| 5326 | make_number (end_char)); | 5326 | make_number (end_char)); |
| @@ -5330,7 +5330,7 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5330 | CHECK_BUFFER (object); | 5330 | CHECK_BUFFER (object); |
| 5331 | 5331 | ||
| 5332 | bp = XBUFFER (object); | 5332 | bp = XBUFFER (object); |
| 5333 | 5333 | ||
| 5334 | if (NILP (start)) | 5334 | if (NILP (start)) |
| 5335 | b = BUF_BEGV (bp); | 5335 | b = BUF_BEGV (bp); |
| 5336 | else | 5336 | else |
| @@ -5346,16 +5346,16 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5346 | CHECK_NUMBER_COERCE_MARKER (end); | 5346 | CHECK_NUMBER_COERCE_MARKER (end); |
| 5347 | e = XINT (end); | 5347 | e = XINT (end); |
| 5348 | } | 5348 | } |
| 5349 | 5349 | ||
| 5350 | if (b > e) | 5350 | if (b > e) |
| 5351 | temp = b, b = e, e = temp; | 5351 | temp = b, b = e, e = temp; |
| 5352 | 5352 | ||
| 5353 | if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp))) | 5353 | if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp))) |
| 5354 | args_out_of_range (start, end); | 5354 | args_out_of_range (start, end); |
| 5355 | 5355 | ||
| 5356 | if (NILP (coding_system)) | 5356 | if (NILP (coding_system)) |
| 5357 | { | 5357 | { |
| 5358 | /* Decide the coding-system to encode the data with. | 5358 | /* Decide the coding-system to encode the data with. |
| 5359 | See fileio.c:Fwrite-region */ | 5359 | See fileio.c:Fwrite-region */ |
| 5360 | 5360 | ||
| 5361 | if (!NILP (Vcoding_system_for_write)) | 5361 | if (!NILP (Vcoding_system_for_write)) |
| @@ -5377,7 +5377,7 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5377 | { | 5377 | { |
| 5378 | /* Check file-coding-system-alist. */ | 5378 | /* Check file-coding-system-alist. */ |
| 5379 | Lisp_Object args[4], val; | 5379 | Lisp_Object args[4], val; |
| 5380 | 5380 | ||
| 5381 | args[0] = Qwrite_region; args[1] = start; args[2] = end; | 5381 | args[0] = Qwrite_region; args[1] = start; args[2] = end; |
| 5382 | args[3] = Fbuffer_file_name(object); | 5382 | args[3] = Fbuffer_file_name(object); |
| 5383 | val = Ffind_operation_coding_system (4, args); | 5383 | val = Ffind_operation_coding_system (4, args); |
| @@ -5422,8 +5422,8 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5422 | object = code_convert_string1 (object, coding_system, Qnil, 1); | 5422 | object = code_convert_string1 (object, coding_system, Qnil, 1); |
| 5423 | } | 5423 | } |
| 5424 | 5424 | ||
| 5425 | md5_buffer (SDATA (object) + start_byte, | 5425 | md5_buffer (SDATA (object) + start_byte, |
| 5426 | SBYTES (object) - (size_byte - end_byte), | 5426 | SBYTES (object) - (size_byte - end_byte), |
| 5427 | digest); | 5427 | digest); |
| 5428 | 5428 | ||
| 5429 | for (i = 0; i < 16; i++) | 5429 | for (i = 0; i < 16; i++) |