]> code.delx.au - gnu-emacs/commitdiff
(syms_of_textprop): Doc fix.
authorRichard M. Stallman <rms@gnu.org>
Sat, 24 Sep 1994 07:24:30 +0000 (07:24 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 24 Sep 1994 07:24:30 +0000 (07:24 +0000)
(Fset_text_properties): Don't let validate_interval_range
increment START and END twice.

src/textprop.c

index 853aa12c902a29a7e1663c66488735e55af326ae..5f3a4f254f30b2745e7a36f513208d7f989c1b07 100644 (file)
@@ -892,6 +892,10 @@ is the string or buffer containing the text.")
   register INTERVAL i, unchanged;
   register INTERVAL prev_changed = NULL_INTERVAL;
   register int s, len;
+  Lisp_Object ostart, oend;
+
+  ostart = start;
+  oend = end;
 
   props = validate_plist (props);
 
@@ -905,6 +909,11 @@ is the string or buffer containing the text.")
       if (NILP (props))
        return Qnil;
 
+      /* Restore the original START and END values
+        because validate_interval_range increments them for strings.  */
+      start = ostart;
+      end = oend;
+
       i = validate_interval_range (object, &start, &end, hard);
       /* This can return if start == end.  */
       if (NULL_INTERVAL_P (i))
@@ -1326,8 +1335,8 @@ void
 syms_of_textprop ()
 {
   DEFVAR_LISP ("inhibit-point-motion-hooks", &Vinhibit_point_motion_hooks,
-              "If non-nil, don't call the text property values of\n\
-`point-left' and `point-entered'.");
+   "If non-nil, don't run `point-left' and `point-entered' text properties.\n\
+This also inhibits the use of the `intangible' text property.");
   Vinhibit_point_motion_hooks = Qnil;
               
   /* Common attributes one might give text */