changeset 49246:c1dbdec496c3

(Fsubstring): Clarify doc string.
author Francesco Potortì <pot@gnu.org>
date Tue, 14 Jan 2003 23:12:31 +0000
parents 40a50cc77be9
children 5856f0179746
files src/fns.c
diffstat 1 files changed, 31 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Tue Jan 14 23:12:01 2003 +0000
+++ b/src/fns.c	Tue Jan 14 23:12:31 2003 +0000
@@ -202,7 +202,7 @@
   return length;
 }
 
-DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, 
+DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
        doc: /* Return the number of bytes in STRING.
 If STRING is a multibyte string, this is greater than the length of STRING. */)
      (string)
@@ -1171,7 +1171,7 @@
 DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0,
        doc: /* Return a substring of STRING, starting at index FROM and ending before TO.
 TO may be nil or omitted; then the substring runs to the end of STRING.
-If FROM or TO is negative, it counts from the end.
+FROM and TO start at 0.  If either is negative, it counts from the end.
 
 This function allows vectors as well as strings.  */)
      (string, from, to)
@@ -1929,7 +1929,7 @@
      Lisp_Object prop;
 {
   Lisp_Object tail;
-  
+
   for (tail = plist;
        CONSP (tail) && CONSP (XCDR (tail));
        tail = XCDR (XCDR (tail)))
@@ -1945,7 +1945,7 @@
 
   if (!NILP (tail))
     wrong_type_argument (Qlistp, prop);
-  
+
   return Qnil;
 }
 
@@ -1983,7 +1983,7 @@
 	  Fsetcar (XCDR (tail), val);
 	  return plist;
 	}
-      
+
       prev = tail;
       QUIT;
     }
@@ -2018,7 +2018,7 @@
      Lisp_Object prop;
 {
   Lisp_Object tail;
-  
+
   for (tail = plist;
        CONSP (tail) && CONSP (XCDR (tail));
        tail = XCDR (XCDR (tail)))
@@ -2031,7 +2031,7 @@
 
   if (!NILP (tail))
     wrong_type_argument (Qlistp, prop);
-  
+
   return Qnil;
 }
 
@@ -2059,7 +2059,7 @@
 	  Fsetcar (XCDR (tail), val);
 	  return plist;
 	}
-      
+
       prev = tail;
       QUIT;
     }
@@ -2194,7 +2194,7 @@
     case Lisp_Type_Limit:
       break;
     }
-  
+
   return 0;
 }
 
@@ -3137,7 +3137,7 @@
 
 DEFUN ("load-average", Fload_average, Sload_average, 0, 1, 0,
        doc: /* Return list of 1 minute, 5 minute and 15 minute load averages.
-     
+
 Each of the three load averages is multiplied by 100, then converted
 to integer.
 
@@ -3172,7 +3172,7 @@
 
 DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0,
        doc: /* Returns t if FEATURE is present in this Emacs.
-     
+
 Use this to conditionalize execution of lisp code based on the
 presence or absence of emacs or environment extensions.
 Use `provide' to declare that a feature is available.  This function
@@ -3249,7 +3249,7 @@
   CHECK_SYMBOL (feature);
 
   tem = Fmemq (feature, Vfeatures);
-  
+
   if (NILP (tem))
     {
       int count = SPECPDL_INDEX ();
@@ -3262,7 +3262,7 @@
       if (! NILP (Vpurify_flag))
 	error ("(require %s) while preparing to dump",
 	       SDATA (SYMBOL_NAME (feature)));
-      
+
       /* A certain amount of recursive `require' is legitimate,
 	 but if we require the same feature recursively 3 times,
 	 signal an error.  */
@@ -4709,7 +4709,7 @@
     {
       h = XHASH_TABLE (table);
       next = h->next_weak;
-      
+
       if (h->size & ARRAY_MARK_FLAG)
 	{
 	  /* TABLE is marked as used.  Sweep its contents.  */
@@ -4922,7 +4922,7 @@
 
 DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0,
        doc: /* Create and return a new hash table.
-	  
+
 Arguments are specified as keyword/argument pairs.  The following
 arguments are defined:
 
@@ -5197,7 +5197,7 @@
 DEFUN ("define-hash-table-test", Fdefine_hash_table_test,
        Sdefine_hash_table_test, 3, 3, 0,
        doc: /* Define a new hash table test with name NAME, a symbol.
-	  
+
 In hash tables created with NAME specified as test, use TEST to
 compare keys, and HASH for computing hash codes of keys.
 
@@ -5223,7 +5223,7 @@
 
 DEFUN ("md5", Fmd5, Smd5, 1, 5, 0,
        doc: /* Return MD5 message digest of OBJECT, a buffer or string.
-	  
+
 A message digest is a cryptographic checksum of a document, and the
 algorithm to calculate it is defined in RFC 1321.
 
@@ -5271,14 +5271,14 @@
 	  if (STRING_MULTIBYTE (object))
 	    /* use default, we can't guess correct value */
 	    coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list));
-	  else 
+	  else
 	    coding_system = Qraw_text;
 	}
-      
+
       if (NILP (Fcoding_system_p (coding_system)))
 	{
 	  /* Invalid coding system.  */
-	  
+
 	  if (!NILP (noerror))
 	    coding_system = Qraw_text;
 	  else
@@ -5312,15 +5312,15 @@
       else
 	{
 	  CHECK_NUMBER (end);
-	  
+
 	  end_char = XINT (end);
 
 	  if (end_char < 0)
 	    end_char += size;
-	  
+
 	  end_byte = string_char_to_byte (object, end_char);
 	}
-      
+
       if (!(0 <= start_char && start_char <= end_char && end_char <= size))
 	args_out_of_range_3 (object, make_number (start_char),
 			     make_number (end_char));
@@ -5330,7 +5330,7 @@
       CHECK_BUFFER (object);
 
       bp = XBUFFER (object);
-	  
+
       if (NILP (start))
 	b = BUF_BEGV (bp);
       else
@@ -5346,16 +5346,16 @@
 	  CHECK_NUMBER_COERCE_MARKER (end);
 	  e = XINT (end);
 	}
-      
+
       if (b > e)
 	temp = b, b = e, e = temp;
-      
+
       if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp)))
 	args_out_of_range (start, end);
-      
+
       if (NILP (coding_system))
 	{
-	  /* Decide the coding-system to encode the data with. 
+	  /* Decide the coding-system to encode the data with.
 	     See fileio.c:Fwrite-region */
 
 	  if (!NILP (Vcoding_system_for_write))
@@ -5377,7 +5377,7 @@
 		{
 		  /* Check file-coding-system-alist.  */
 		  Lisp_Object args[4], val;
-		  
+
 		  args[0] = Qwrite_region; args[1] = start; args[2] = end;
 		  args[3] = Fbuffer_file_name(object);
 		  val = Ffind_operation_coding_system (4, args);
@@ -5422,8 +5422,8 @@
 	object = code_convert_string1 (object, coding_system, Qnil, 1);
     }
 
-  md5_buffer (SDATA (object) + start_byte, 
-	      SBYTES (object) - (size_byte - end_byte), 
+  md5_buffer (SDATA (object) + start_byte,
+	      SBYTES (object) - (size_byte - end_byte),
 	      digest);
 
   for (i = 0; i < 16; i++)