Use AREF and ASIZE.
[bpt/emacs.git] / src / doc.c
index 49ef925..be97690 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -304,10 +304,10 @@ read_doc_string (filepos)
 }
 
 DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0,
-  "Return the documentation string of FUNCTION.\n\
-Unless a non-nil second argument RAW is given, the\n\
-string is passed through `substitute-command-keys'.")
-  (function, raw)
+       doc: /* Return the documentation string of FUNCTION.
+Unless a non-nil second argument RAW is given, the
+string is passed through `substitute-command-keys'.  */)
+     (function, raw)
      Lisp_Object function, raw;
 {
   Lisp_Object fun;
@@ -391,13 +391,13 @@ string is passed through `substitute-command-keys'.")
 
 DEFUN ("documentation-property", Fdocumentation_property,
        Sdocumentation_property, 2, 3, 0,
-  "Return the documentation string that is SYMBOL's PROP property.\n\
-Third argument RAW omitted or nil means pass the result through\n\
-`substitute-command-keys' if it is a string.\n\
-\n\
-This differs from `get' in that it can refer to strings stored in the\n\
-`etc/DOC' file; and that it evaluates documentation properties that\n\
-aren't strings.")
+       doc: /* Return the documentation string that is SYMBOL's PROP property.
+Third argument RAW omitted or nil means pass the result through
+`substitute-command-keys' if it is a string.
+
+This differs from `get' in that it can refer to strings stored in the
+`etc/DOC' file; and that it evaluates documentation properties that
+aren't strings.  */)
   (symbol, prop, raw)
      Lisp_Object symbol, prop, raw;
 {
@@ -461,14 +461,15 @@ store_function_docstring (fun, offset)
 
 
 DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation,
-  1, 1, 0,
-  "Used during Emacs initialization, before dumping runnable Emacs,\n\
-to find pointers to doc strings stored in `etc/DOC...' and\n\
-record them in function definitions.\n\
-One arg, FILENAME, a string which does not include a directory.\n\
-The file is found in `../etc' now; found in the `data-directory'\n\
-when doc strings are referred to later in the dumped Emacs.")
-  (filename)
+       1, 1, 0,
+       doc: /* Used during Emacs initialization to scan the `etc/DOC...' file.
+This searches the `etc/DOC...' file for doc strings and
+records them in function and variable definitions.
+The function takes one argument, FILENAME, a string;
+it specifies the file name (without a directory) of the DOC file.
+That file is found in `../etc' now; later, when the dumped Emacs is run,
+the same file name is found in the `data-directory'.  */)
+     (filename)
      Lisp_Object filename;
 {
   int fd;
@@ -491,8 +492,8 @@ when doc strings are referred to later in the dumped Emacs.")
   strcpy (name, "../etc/");
 #else /* CANNOT_DUMP */
   CHECK_STRING (Vdoc_directory);
-  name = (char *) alloca (XSTRING (filename)->size +
-                         XSTRING (Vdoc_directory)->size + 1);
+  name = (char *) alloca (XSTRING (filename)->size
+                         XSTRING (Vdoc_directory)->size + 1);
   strcpy (name, XSTRING (Vdoc_directory)->data);
 #endif /* CANNOT_DUMP */
   strcat (name, XSTRING (filename)->data);     /*** Add this line ***/
@@ -568,18 +569,18 @@ when doc strings are referred to later in the dumped Emacs.")
 }
 \f
 DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
-  Ssubstitute_command_keys, 1, 1, 0,
-  "Substitute key descriptions for command names in STRING.\n\
-Return a new string which is STRING with substrings of the form \\=\\[COMMAND]\n\
-replaced by either:  a keystroke sequence that will invoke COMMAND,\n\
-or \"M-x COMMAND\" if COMMAND is not on any keys.\n\
-Substrings of the form \\=\\{MAPVAR} are replaced by summaries\n\
-\(made by describe-bindings) of the value of MAPVAR, taken as a keymap.\n\
-Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR\n\
-as the keymap for future \\=\\[COMMAND] substrings.\n\
-\\=\\= quotes the following character and is discarded;\n\
-thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output.")
-  (string)
+       Ssubstitute_command_keys, 1, 1, 0,
+       doc: /* Substitute key descriptions for command names in STRING.
+Return a new string which is STRING with substrings of the form \\=\\[COMMAND]
+replaced by either:  a keystroke sequence that will invoke COMMAND,
+or "M-x COMMAND" if COMMAND is not on any keys.
+Substrings of the form \\=\\{MAPVAR} are replaced by summaries
+\(made by describe-bindings) of the value of MAPVAR, taken as a keymap.
+Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR
+as the keymap for future \\=\\[COMMAND] substrings.
+\\=\\= quotes the following character and is discarded;
+thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output.  */)
+     (string)
      Lisp_Object string;
 {
   unsigned char *buf;
@@ -815,7 +816,7 @@ syms_of_doc ()
   staticpro (&Qfunction_documentation);
   
   DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name,
-    "Name of file containing documentation strings of built-in symbols.");
+              doc: /* Name of file containing documentation strings of built-in symbols.  */);
   Vdoc_file_name = Qnil;
 
   defsubr (&Sdocumentation);