diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/buffer.c b/src/buffer.c index a12c80ec0b0..e5cc5f367f0 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1413,7 +1413,7 @@ state of the current buffer. Use with care. */) /* If SAVE_MODIFF == auto_save_modified == MODIFF, we can either decrease SAVE_MODIFF and auto_save_modified or increase MODIFF. */ - : MODIFF++); + : modiff_incr (&MODIFF)); return flag; } @@ -1422,11 +1422,11 @@ DEFUN ("buffer-modified-tick", Fbuffer_modified_tick, Sbuffer_modified_tick, 0, 1, 0, doc: /* Return BUFFER's tick counter, incremented for each change in text. Each buffer has a tick counter which is incremented each time the -text in that buffer is changed. It wraps around occasionally. -No argument or nil as argument means use current buffer as BUFFER. */) - (register Lisp_Object buffer) +text in that buffer is changed. No argument or nil as argument means +use current buffer as BUFFER. */) + (Lisp_Object buffer) { - return make_fixnum (BUF_MODIFF (decode_buffer (buffer))); + return modiff_to_integer (BUF_MODIFF (decode_buffer (buffer))); } DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick, @@ -1439,9 +1439,9 @@ values returned by two individual calls of `buffer-chars-modified-tick', you can tell whether a character change occurred in that buffer in between these calls. No argument or nil as argument means use current buffer as BUFFER. */) - (register Lisp_Object buffer) + (Lisp_Object buffer) { - return make_fixnum (BUF_CHARS_MODIFF (decode_buffer (buffer))); + return modiff_to_integer (BUF_CHARS_MODIFF (decode_buffer (buffer))); } DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, @@ -2375,9 +2375,12 @@ results, see Info node `(elisp)Swapping Text'. */) bset_point_before_scroll (current_buffer, Qnil); bset_point_before_scroll (other_buffer, Qnil); - current_buffer->text->modiff++; other_buffer->text->modiff++; - current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++; - current_buffer->text->overlay_modiff++; other_buffer->text->overlay_modiff++; + modiff_incr (¤t_buffer->text->modiff); + modiff_incr (&other_buffer->text->modiff); + modiff_incr (¤t_buffer->text->chars_modiff); + modiff_incr (&other_buffer->text->chars_modiff); + modiff_incr (¤t_buffer->text->overlay_modiff); + modiff_incr (&other_buffer->text->overlay_modiff); current_buffer->text->beg_unchanged = current_buffer->text->gpt; current_buffer->text->end_unchanged = current_buffer->text->gpt; other_buffer->text->beg_unchanged = other_buffer->text->gpt; @@ -3913,7 +3916,7 @@ modify_overlay (struct buffer *buf, ptrdiff_t start, ptrdiff_t end) bset_redisplay (buf); - ++BUF_OVERLAY_MODIFF (buf); + modiff_incr (&BUF_OVERLAY_MODIFF (buf)); } /* Remove OVERLAY from LIST. */ |