diff options
Diffstat (limited to 'src/undo.c')
| -rw-r--r-- | src/undo.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/undo.c b/src/undo.c index e80ec58ab09..1975e387e3f 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -126,15 +126,11 @@ record_insert (ptrdiff_t beg, ptrdiff_t length) | |||
| 126 | static void | 126 | static void |
| 127 | record_marker_adjustments (ptrdiff_t from, ptrdiff_t to) | 127 | record_marker_adjustments (ptrdiff_t from, ptrdiff_t to) |
| 128 | { | 128 | { |
| 129 | Lisp_Object marker; | 129 | prepare_record (); |
| 130 | register struct Lisp_Marker *m; | ||
| 131 | register ptrdiff_t charpos, adjustment; | ||
| 132 | |||
| 133 | prepare_record(); | ||
| 134 | 130 | ||
| 135 | for (m = BUF_MARKERS (current_buffer); m; m = m->next) | 131 | for (struct Lisp_Marker *m = BUF_MARKERS (current_buffer); m; m = m->next) |
| 136 | { | 132 | { |
| 137 | charpos = m->charpos; | 133 | ptrdiff_t charpos = m->charpos; |
| 138 | eassert (charpos <= Z); | 134 | eassert (charpos <= Z); |
| 139 | 135 | ||
| 140 | if (from <= charpos && charpos <= to) | 136 | if (from <= charpos && charpos <= to) |
| @@ -146,11 +142,11 @@ record_marker_adjustments (ptrdiff_t from, ptrdiff_t to) | |||
| 146 | insertion_type t markers will automatically move forward | 142 | insertion_type t markers will automatically move forward |
| 147 | upon re-inserting the deleted text, so we have to arrange | 143 | upon re-inserting the deleted text, so we have to arrange |
| 148 | for them to move backward to the correct position. */ | 144 | for them to move backward to the correct position. */ |
| 149 | adjustment = (m->insertion_type ? to : from) - charpos; | 145 | ptrdiff_t adjustment = (m->insertion_type ? to : from) - charpos; |
| 150 | 146 | ||
| 151 | if (adjustment) | 147 | if (adjustment) |
| 152 | { | 148 | { |
| 153 | XSETMISC (marker, m); | 149 | Lisp_Object marker = make_lisp_ptr (m, Lisp_Vectorlike); |
| 154 | bset_undo_list | 150 | bset_undo_list |
| 155 | (current_buffer, | 151 | (current_buffer, |
| 156 | Fcons (Fcons (marker, make_fixnum (adjustment)), | 152 | Fcons (Fcons (marker, make_fixnum (adjustment)), |