aboutsummaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-12 17:04:51 +0000
committerRichard M. Stallman1993-06-12 17:04:51 +0000
commitd8552b2f30fad04bf1fb531cabcced4afaf28bcc (patch)
treec8ed07ffc75b9f1ea2ca5175e60842417c6587b6 /src/undo.c
parent43f868f524a7ad7bed8b9e790996170fd7673eb2 (diff)
downloademacs-d8552b2f30fad04bf1fb531cabcced4afaf28bcc.tar.gz
emacs-d8552b2f30fad04bf1fb531cabcced4afaf28bcc.zip
(record_delete): Always use XFASTINT on sbeg.
(Fprimitive_undo): Add missing `else'. Add USE_TEXT_PROPERTIES conditional for calling Fput_text_property. Use XINT on high, low.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/undo.c b/src/undo.c
index 04003cb6cc5..18bfc3a3b2b 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -94,7 +94,7 @@ record_delete (beg, length)
94 XFASTINT (lend) = beg + length; 94 XFASTINT (lend) = beg + length;
95 95
96 /* If point isn't at start of deleted range, record where it is. */ 96 /* If point isn't at start of deleted range, record where it is. */
97 if (PT != sbeg) 97 if (PT != XFASTINT (sbeg))
98 current_buffer->undo_list 98 current_buffer->undo_list
99 = Fcons (make_number (PT), current_buffer->undo_list); 99 = Fcons (make_number (PT), current_buffer->undo_list);
100 100
@@ -325,7 +325,7 @@ Return what remains of the list.")
325 325
326 high = Fcar (cdr); 326 high = Fcar (cdr);
327 low = Fcdr (cdr); 327 low = Fcdr (cdr);
328 mod_time = (high << 16) + low; 328 mod_time = (XFASTINT (high) << 16) + XFASTINT (low);
329 /* If this records an obsolete save 329 /* If this records an obsolete save
330 (not matching the actual disk file) 330 (not matching the actual disk file)
331 then don't mark unmodified. */ 331 then don't mark unmodified. */
@@ -336,9 +336,10 @@ Return what remains of the list.")
336#endif /* CLASH_DETECTION */ 336#endif /* CLASH_DETECTION */
337 Fset_buffer_modified_p (Qnil); 337 Fset_buffer_modified_p (Qnil);
338 } 338 }
339 if (EQ (car, Qnil)) 339#ifdef USE_TEXT_PROPERTIES
340 else if (EQ (car, Qnil))
340 { 341 {
341 /* Element (t prop val beg . end) records property change. */ 342 /* Element (nil prop val beg . end) is property change. */
342 Lisp_Object beg, end, prop, val; 343 Lisp_Object beg, end, prop, val;
343 344
344 prop = Fcar (cdr); 345 prop = Fcar (cdr);
@@ -350,6 +351,7 @@ Return what remains of the list.")
350 351
351 Fput_text_property (beg, end, prop, val, Qnil); 352 Fput_text_property (beg, end, prop, val, Qnil);
352 } 353 }
354#endif /* USE_TEXT_PROPERTIES */
353 else if (XTYPE (car) == Lisp_Int && XTYPE (cdr) == Lisp_Int) 355 else if (XTYPE (car) == Lisp_Int && XTYPE (cdr) == Lisp_Int)
354 { 356 {
355 /* Element (BEG . END) means range was inserted. */ 357 /* Element (BEG . END) means range was inserted. */