aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Lord2016-06-17 22:34:50 +0100
committerPhillip Lord2016-06-21 21:39:33 +0100
commitc98bc9821f4a402d5fda67fe141ed34622c50e4f (patch)
tree5648321e093778d832aecb8c33f5f0bcaa4f57df
parent6cf8f0b74e45cec12756e99d3735e3906c515c5c (diff)
downloademacs-c98bc9821f4a402d5fda67fe141ed34622c50e4f.tar.gz
emacs-c98bc9821f4a402d5fda67fe141ed34622c50e4f.zip
Ensure undo-boundary after all commands
* lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after every command whether it (apparently) changes the buffer or not. See Bug#23785 for discussion.
-rw-r--r--lisp/simple.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a502448b31c..bc3e7b83b8d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2884,6 +2884,10 @@ REASON describes the reason that the boundary is being added; see
2884 "Check recently changed buffers and add a boundary if necessary. 2884 "Check recently changed buffers and add a boundary if necessary.
2885REASON describes the reason that the boundary is being added; see 2885REASON describes the reason that the boundary is being added; see
2886`undo-last-boundary' for more information." 2886`undo-last-boundary' for more information."
2887 ;; (Bug #23785) All commands should ensure that there is an undo
2888 ;; boundary whether they have changed the current buffer or not.
2889 (when (eq cause 'command)
2890 (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer)))
2887 (dolist (b undo-auto--undoably-changed-buffers) 2891 (dolist (b undo-auto--undoably-changed-buffers)
2888 (when (buffer-live-p b) 2892 (when (buffer-live-p b)
2889 (with-current-buffer b 2893 (with-current-buffer b