diff options
| author | Bill Wohler | 2014-02-23 18:04:35 -0800 |
|---|---|---|
| committer | Bill Wohler | 2014-02-23 18:04:35 -0800 |
| commit | 3e93bafb95608467e438ba7f725fd1f020669f8c (patch) | |
| tree | f2f90109f283e06a18caea3cb2a2623abcfb3a92 /src/undo.c | |
| parent | 791c0d7634e44bb92ca85af605be84ff2ae08963 (diff) | |
| parent | e918e27fdf331e89268fc2c9d7cf838d3ecf7aa7 (diff) | |
| download | emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.tar.gz emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.zip | |
Merge from trunk; up to 2014-02-23T23:41:17Z!lekktu@gmail.com.
Diffstat (limited to 'src/undo.c')
| -rw-r--r-- | src/undo.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/undo.c b/src/undo.c index 63edc8e9b8d..7286d40b2e5 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* undo handling for GNU Emacs. | 1 | /* undo handling for GNU Emacs. |
| 2 | Copyright (C) 1990, 1993-1994, 2000-2013 Free Software Foundation, | 2 | Copyright (C) 1990, 1993-1994, 2000-2014 Free Software Foundation, |
| 3 | Inc. | 3 | Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -55,7 +55,7 @@ static Lisp_Object pending_boundary; | |||
| 55 | static void | 55 | static void |
| 56 | record_point (ptrdiff_t pt) | 56 | record_point (ptrdiff_t pt) |
| 57 | { | 57 | { |
| 58 | int at_boundary; | 58 | bool at_boundary; |
| 59 | 59 | ||
| 60 | /* Don't record position of pt when undo_inhibit_record_point holds. */ | 60 | /* Don't record position of pt when undo_inhibit_record_point holds. */ |
| 61 | if (undo_inhibit_record_point) | 61 | if (undo_inhibit_record_point) |
| @@ -77,7 +77,7 @@ record_point (ptrdiff_t pt) | |||
| 77 | 77 | ||
| 78 | if (CONSP (BVAR (current_buffer, undo_list))) | 78 | if (CONSP (BVAR (current_buffer, undo_list))) |
| 79 | { | 79 | { |
| 80 | /* Set AT_BOUNDARY to 1 only when we have nothing other than | 80 | /* Set AT_BOUNDARY only when we have nothing other than |
| 81 | marker adjustment before undo boundary. */ | 81 | marker adjustment before undo boundary. */ |
| 82 | 82 | ||
| 83 | Lisp_Object tail = BVAR (current_buffer, undo_list), elt; | 83 | Lisp_Object tail = BVAR (current_buffer, undo_list), elt; |
| @@ -229,10 +229,9 @@ record_first_change (void) | |||
| 229 | if (base_buffer->base_buffer) | 229 | if (base_buffer->base_buffer) |
| 230 | base_buffer = base_buffer->base_buffer; | 230 | base_buffer = base_buffer->base_buffer; |
| 231 | 231 | ||
| 232 | bset_undo_list | 232 | bset_undo_list (current_buffer, |
| 233 | (current_buffer, | 233 | Fcons (Fcons (Qt, Fvisited_file_modtime ()), |
| 234 | Fcons (Fcons (Qt, make_lisp_time (base_buffer->modtime)), | 234 | BVAR (current_buffer, undo_list))); |
| 235 | BVAR (current_buffer, undo_list))); | ||
| 236 | } | 235 | } |
| 237 | 236 | ||
| 238 | /* Record a change in property PROP (whose old value was VAL) | 237 | /* Record a change in property PROP (whose old value was VAL) |
| @@ -245,7 +244,7 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length, | |||
| 245 | { | 244 | { |
| 246 | Lisp_Object lbeg, lend, entry; | 245 | Lisp_Object lbeg, lend, entry; |
| 247 | struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); | 246 | struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); |
| 248 | int boundary = 0; | 247 | bool boundary = 0; |
| 249 | 248 | ||
| 250 | if (EQ (BVAR (buf, undo_list), Qt)) | 249 | if (EQ (BVAR (buf, undo_list), Qt)) |
| 251 | return; | 250 | return; |
| @@ -445,12 +444,6 @@ truncate_undo_list (struct buffer *b) | |||
| 445 | unbind_to (count, Qnil); | 444 | unbind_to (count, Qnil); |
| 446 | } | 445 | } |
| 447 | 446 | ||
| 448 | static _Noreturn void | ||
| 449 | user_error (const char *msg) | ||
| 450 | { | ||
| 451 | xsignal1 (Quser_error, build_string (msg)); | ||
| 452 | } | ||
| 453 | |||
| 454 | 447 | ||
| 455 | void | 448 | void |
| 456 | syms_of_undo (void) | 449 | syms_of_undo (void) |