aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPhillip Lord2015-11-19 15:57:55 +0000
committerPhillip Lord2015-11-26 17:57:11 +0000
commit7592cb9d2a5d68dcb556c87226e38588ce555bd9 (patch)
treed845f1a53b432956e3c1711b586d938aac50996a /lisp
parent02cd9cb8afd9510e3bdb20ce7148d1b9a6aa9d12 (diff)
downloademacs-7592cb9d2a5d68dcb556c87226e38588ce555bd9.tar.gz
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 'lisp')
-rw-r--r--lisp/simple.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 6a745c7cb25..b6bf010ed3a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2872,10 +2872,11 @@ See also `undo-auto--buffer-undoably-changed'.")
2872(defun undo-auto--add-boundary () 2872(defun undo-auto--add-boundary ()
2873 "Add an `undo-boundary' in appropriate buffers." 2873 "Add an `undo-boundary' in appropriate buffers."
2874 (undo-auto--boundaries 2874 (undo-auto--boundaries
2875 (if undo-auto--this-command-amalgamating 2875 (let ((amal undo-auto--this-command-amalgamating))
2876 'amalgamate 2876 (setq undo-auto--this-command-amalgamating nil)
2877 'command)) 2877 (if amal
2878 (setq undo-auto--this-command-amalgamating nil)) 2878 'amalgamate
2879 'command))))
2879 2880
2880(defun undo-auto--amalgamate () 2881(defun undo-auto--amalgamate ()
2881 "Amalgamate undo if necessary. 2882 "Amalgamate undo if necessary.