X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/16a97296c05ec9d5bb4ffeae9dce90fc63f578ed..be44ca6cd47bff4cb0dfcfd71aa14f10fdab5434:/src/undo.c diff --git a/src/undo.c b/src/undo.c index b310133900..e7e9ae5632 100644 --- a/src/undo.c +++ b/src/undo.c @@ -26,11 +26,11 @@ along with GNU Emacs. If not, see . */ /* Last buffer for which undo information was recorded. */ /* BEWARE: This is not traced by the GC, so never dereference it! */ -struct buffer *last_undo_buffer; +static struct buffer *last_undo_buffer; /* Position of point last time we inserted a boundary. */ -struct buffer *last_boundary_buffer; -EMACS_INT last_boundary_position; +static struct buffer *last_boundary_buffer; +static EMACS_INT last_boundary_position; Lisp_Object Qinhibit_read_only; @@ -43,7 +43,7 @@ Lisp_Object Qapply; which will be added to the list at the end of the command. This ensures we can't run out of space while trying to make an undo-boundary. */ -Lisp_Object pending_boundary; +static Lisp_Object pending_boundary; /* Record point as it was at beginning of this command (if necessary) and prepare the undo info for recording a change. @@ -212,7 +212,6 @@ record_change (EMACS_INT beg, EMACS_INT length) void record_first_change (void) { - Lisp_Object high, low; struct buffer *base_buffer = current_buffer; if (EQ (BVAR (current_buffer, undo_list), Qt)) @@ -225,9 +224,9 @@ record_first_change (void) if (base_buffer->base_buffer) base_buffer = base_buffer->base_buffer; - XSETFASTINT (high, (base_buffer->modtime >> 16) & 0xffff); - XSETFASTINT (low, base_buffer->modtime & 0xffff); - BVAR (current_buffer, undo_list) = Fcons (Fcons (Qt, Fcons (high, low)), BVAR (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = + Fcons (Fcons (Qt, INTEGER_TO_CONS (base_buffer->modtime)), + BVAR (current_buffer, undo_list)); } /* Record a change in property PROP (whose old value was VAL) @@ -270,7 +269,7 @@ record_property_change (EMACS_INT beg, EMACS_INT length, current_buffer = obuf; } -DEFUE ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, +DEFUN ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, doc: /* Mark a boundary between units of undo. An undo command will stop at this point, but another undo command will undo to the previous boundary. */) @@ -499,13 +498,9 @@ Return what remains of the list. */) if (EQ (car, Qt)) { /* Element (t high . low) records previous modtime. */ - Lisp_Object high, low; - int mod_time; struct buffer *base_buffer = current_buffer; - - high = Fcar (cdr); - low = Fcdr (cdr); - mod_time = (XFASTINT (high) << 16) + XFASTINT (low); + time_t mod_time; + CONS_TO_INTEGER (cdr, time_t, mod_time); if (current_buffer->base_buffer) base_buffer = current_buffer->base_buffer;