comparison src/undo.c @ 12088:f0c9d02fb6e4

(record_insert): Change args to be ints, not Lisp_Objects.
author Karl Heuer <kwzh@gnu.org>
date Tue, 06 Jun 1995 01:40:34 +0000
parents 323ad02feb1e
children 43434a01d442
comparison
equal deleted inserted replaced
12087:3bbf71f1cf30 12088:f0c9d02fb6e4
40 for LENGTH characters at position BEG. 40 for LENGTH characters at position BEG.
41 (It is possible to record an insertion before or after the fact 41 (It is possible to record an insertion before or after the fact
42 because we don't need to record the contents.) */ 42 because we don't need to record the contents.) */
43 43
44 record_insert (beg, length) 44 record_insert (beg, length)
45 Lisp_Object beg, length; 45 int beg, length;
46 { 46 {
47 Lisp_Object lbeg, lend; 47 Lisp_Object lbeg, lend;
48 48
49 if (EQ (current_buffer->undo_list, Qt)) 49 if (EQ (current_buffer->undo_list, Qt))
50 return; 50 return;
67 Lisp_Object elt; 67 Lisp_Object elt;
68 elt = XCONS (current_buffer->undo_list)->car; 68 elt = XCONS (current_buffer->undo_list)->car;
69 if (CONSP (elt) 69 if (CONSP (elt)
70 && INTEGERP (XCONS (elt)->car) 70 && INTEGERP (XCONS (elt)->car)
71 && INTEGERP (XCONS (elt)->cdr) 71 && INTEGERP (XCONS (elt)->cdr)
72 && XINT (XCONS (elt)->cdr) == XINT (beg)) 72 && XINT (XCONS (elt)->cdr) == beg)
73 { 73 {
74 XSETINT (XCONS (elt)->cdr, XINT (beg) + XINT (length)); 74 XSETINT (XCONS (elt)->cdr, beg + length);
75 return; 75 return;
76 } 76 }
77 } 77 }
78 78
79 lbeg = beg; 79 XSETFASTINT (lbeg, beg);
80 XSETINT (lend, XINT (beg) + XINT (length)); 80 XSETINT (lend, beg + length);
81 current_buffer->undo_list = Fcons (Fcons (lbeg, lend), 81 current_buffer->undo_list = Fcons (Fcons (lbeg, lend),
82 current_buffer->undo_list); 82 current_buffer->undo_list);
83 } 83 }
84 84
85 /* Record that a deletion is about to take place, 85 /* Record that a deletion is about to take place,