Merge from mainline.
[bpt/emacs.git] / src / doc.c
index a793011..d27fa3f 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -42,8 +42,9 @@ static char *get_doc_string_buffer;
 static int get_doc_string_buffer_size;
 
 static unsigned char *read_bytecode_pointer;
-INFUN (Fdocumentation_property, 3);
-INFUN (Fsnarf_documentation, 1);
+static Lisp_Object Fdocumentation_property (Lisp_Object, Lisp_Object,
+                                           Lisp_Object);
+static Lisp_Object Fsnarf_documentation (Lisp_Object);
 
 /* readchar in lread.c calls back here to fetch the next byte.
    If UNREADFLAG is 1, we unread a byte.  */
@@ -155,7 +156,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
   if (0 > lseek (fd, position - offset, 0))
     {
       emacs_close (fd);
-      error ("Position %"pEd" out of range in doc string file \"%s\"",
+      error ("Position %"pI"d out of range in doc string file \"%s\"",
             position, name);
     }
 
@@ -252,7 +253,9 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
          else if (c == '_')
            *to++ = 037;
          else
-           error ("Invalid data in documentation file -- ^A followed by code 0%o", c);
+           error ("\
+Invalid data in documentation file -- %c followed by code %03o",
+                  1, (unsigned)c);
        }
       else
        *to++ = *from++;
@@ -670,7 +673,7 @@ the same file name is found in the `doc-directory'.  */)
                ; /* Just a source file name boundary marker.  Ignore it.  */
 
              else
-               error ("DOC file invalid at position %"pEd, pos);
+               error ("DOC file invalid at position %"pI"d", pos);
            }
        }
       pos += end - buf;
@@ -786,7 +789,7 @@ a new string, without any text properties, is returned.  */)
        do_remap:
          tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil);
 
-         if (VECTORP (tem) && XVECTOR (tem)->size > 1
+         if (VECTORP (tem) && ASIZE (tem) > 1
              && EQ (AREF (tem, 0), Qremap) && SYMBOLP (AREF (tem, 1))
              && follow_remap)
            {