aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-24 07:24:30 +0000
committerRichard M. Stallman1994-09-24 07:24:30 +0000
commit33d7d0df7335a043b77c92c73bc81eb20e9769d9 (patch)
treec4c0caeff96c443dd0fe09001e6f3d4387a381b9 /src
parentdeec9e7434f1abb2aa8b11adbb73e1cd86b6c407 (diff)
downloademacs-33d7d0df7335a043b77c92c73bc81eb20e9769d9.tar.gz
emacs-33d7d0df7335a043b77c92c73bc81eb20e9769d9.zip
(syms_of_textprop): Doc fix.
(Fset_text_properties): Don't let validate_interval_range increment START and END twice.
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 853aa12c902..5f3a4f254f3 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -892,6 +892,10 @@ is the string or buffer containing the text.")
892 register INTERVAL i, unchanged; 892 register INTERVAL i, unchanged;
893 register INTERVAL prev_changed = NULL_INTERVAL; 893 register INTERVAL prev_changed = NULL_INTERVAL;
894 register int s, len; 894 register int s, len;
895 Lisp_Object ostart, oend;
896
897 ostart = start;
898 oend = end;
895 899
896 props = validate_plist (props); 900 props = validate_plist (props);
897 901
@@ -905,6 +909,11 @@ is the string or buffer containing the text.")
905 if (NILP (props)) 909 if (NILP (props))
906 return Qnil; 910 return Qnil;
907 911
912 /* Restore the original START and END values
913 because validate_interval_range increments them for strings. */
914 start = ostart;
915 end = oend;
916
908 i = validate_interval_range (object, &start, &end, hard); 917 i = validate_interval_range (object, &start, &end, hard);
909 /* This can return if start == end. */ 918 /* This can return if start == end. */
910 if (NULL_INTERVAL_P (i)) 919 if (NULL_INTERVAL_P (i))
@@ -1326,8 +1335,8 @@ void
1326syms_of_textprop () 1335syms_of_textprop ()
1327{ 1336{
1328 DEFVAR_LISP ("inhibit-point-motion-hooks", &Vinhibit_point_motion_hooks, 1337 DEFVAR_LISP ("inhibit-point-motion-hooks", &Vinhibit_point_motion_hooks,
1329 "If non-nil, don't call the text property values of\n\ 1338 "If non-nil, don't run `point-left' and `point-entered' text properties.\n\
1330`point-left' and `point-entered'."); 1339This also inhibits the use of the `intangible' text property.");
1331 Vinhibit_point_motion_hooks = Qnil; 1340 Vinhibit_point_motion_hooks = Qnil;
1332 1341
1333 /* Common attributes one might give text */ 1342 /* Common attributes one might give text */