]> code.delx.au - gnu-emacs/blobdiff - src/textprop.c
(get_doc_string): New arg UNIBYTE
[gnu-emacs] / src / textprop.c
index 3fafc38d1294bf9b249998eb1a5815d04f8ffdb7..26d06cd7659067b19ebcf27f41cbc9087133e6a6 100644 (file)
@@ -492,6 +492,8 @@ interval_of (position, object)
 
   if (NILP (object))
     XSETBUFFER (object, current_buffer);
+  else if (EQ (object, Qt))
+    return NULL_INTERVAL;
 
   CHECK_STRING_OR_BUFFER (object, 0);
 
@@ -514,7 +516,7 @@ interval_of (position, object)
     }
 
   if (!(beg <= position && position <= end))
-    args_out_of_range (position, position);
+    args_out_of_range (make_number (position), make_number (position));
   if (beg == end || NULL_INTERVAL_P (i))
     return NULL_INTERVAL;
     
@@ -523,9 +525,9 @@ interval_of (position, object)
 \f
 DEFUN ("text-properties-at", Ftext_properties_at,
        Stext_properties_at, 1, 2, 0,
-  "Return the list of properties held by the character at POSITION\n\
-in optional argument OBJECT, a string or buffer.  If nil, OBJECT\n\
-defaults to the current buffer.\n\
+  "Return the list of properties of the character at POSITION in OBJECT.\n\
+OBJECT is the string or buffer to look for the properties in;\n\
+nil means the current buffer.\n\
 If POSITION is at the end of OBJECT, the value is nil.")
   (position, object)
      Lisp_Object position, object;
@@ -1553,12 +1555,13 @@ call_mod_hooks (list, start, end)
   UNGCPRO;
 }
 
-/* Check for read-only intervals and signal an error if we find one.
-   Then check for any modification hooks in the range START up to
-   (but not including) END.  Create a list of all these hooks in
-   lexicographic order, eliminating consecutive extra copies of the
-   same hook.  Then call those hooks in order, with START and END - 1
-   as arguments.  */
+/* Check for read-only intervals between character positions START ... END,
+   in BUF, and signal an error if we find one.
+
+   Then check for any modification hooks in the range.
+   Create a list of all these hooks in lexicographic order,
+   eliminating consecutive extra copies of the same hook.  Then call
+   those hooks in order, with START and END - 1 as arguments.  */
 
 void
 verify_interval_modification (buf, start, end)
@@ -1729,7 +1732,7 @@ verify_interval_modification (buf, start, end)
     }
 }
 
-/* Run the interval hooks for an insertion.
+/* Run the interval hooks for an insertion on character range START ... END.
    verify_interval_modification chose which hooks to run;
    this function is called after the insertion happens
    so it can indicate the range of inserted text.  */
@@ -1739,13 +1742,11 @@ report_interval_modification (start, end)
      Lisp_Object start, end;
 {
   if (! NILP (interval_insert_behind_hooks))
-    call_mod_hooks (interval_insert_behind_hooks,
-                   make_number (start), make_number (end));
+    call_mod_hooks (interval_insert_behind_hooks, start, end);
   if (! NILP (interval_insert_in_front_hooks)
       && ! EQ (interval_insert_in_front_hooks,
               interval_insert_behind_hooks))
-    call_mod_hooks (interval_insert_in_front_hooks,
-                   make_number (start), make_number (end));
+    call_mod_hooks (interval_insert_in_front_hooks, start, end);
 }
 \f
 void