diff options
author | Phillip Lord <phillip.lord@russet.org.uk> | 2015-11-19 15:57:55 +0000 |
---|---|---|
committer | Phillip Lord <phillip.lord@russet.org.uk> | 2015-11-26 17:57:11 +0000 |
commit | 7592cb9d2a5d68dcb556c87226e38588ce555bd9 (patch) | |
tree | d845f1a53b432956e3c1711b586d938aac50996a /src/keyboard.h | |
parent | 02cd9cb8afd9510e3bdb20ce7148d1b9a6aa9d12 (diff) | |
download | emacs-7592cb9d2a5d68dcb556c87226e38588ce555bd9.tar.gz emacs-7592cb9d2a5d68dcb556c87226e38588ce555bd9.tar.bz2 emacs-7592cb9d2a5d68dcb556c87226e38588ce555bd9.zip |
After delete, record point location in undo.
Addresses Bug #21968.
* lisp/simple.el (undo-auto--add-boundary): Clean up code to
better support intercalating calls.
* src/keyboard.c,src/keyboard.h (command_loop_1): Store value of
point and current buffer before each command.
* src/undo.c (record_point): Now only record the point.
* src/undo.c (prepare_record): Functionality removed form
record_point.
* src/undo.c (record_delete): Check if point needs recording.
* src/undo.c (undo-boundary): Record value of point before each
boundary.
* test/automated/simple-test.el: New tests.
Conflicts:
src/undo.c
Diffstat (limited to 'src/keyboard.h')
-rw-r--r-- | src/keyboard.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index 98bc86b58ed..6c715a44fba 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -245,6 +245,19 @@ extern KBOARD *current_kboard; /* Total number of times read_char has returned, modulo UINTMAX_MAX + 1. */ extern uintmax_t num_input_events; + +/* The location of point immediately before the last command was + executed, or the last time the undo-boundary command added a + boundary.*/ +ptrdiff_t point_before_last_command_or_undo; + +/* The value of current_buffer immediately before the last command was + executed, or the last time the undo-boundary command added a + boundary.*/ +struct buffer *buffer_before_last_command_or_undo; + +extern struct buffer *prev_buffer; + /* Nonzero means polling for input is temporarily suppressed. */ extern int poll_suppress_count; |