summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 6a745c7cb2..b6bf010ed3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2872,10 +2872,11 @@ See also `undo-auto--buffer-undoably-changed'.")
(defun undo-auto--add-boundary ()
"Add an `undo-boundary' in appropriate buffers."
(undo-auto--boundaries
- (if undo-auto--this-command-amalgamating
- 'amalgamate
- 'command))
- (setq undo-auto--this-command-amalgamating nil))
+ (let ((amal undo-auto--this-command-amalgamating))
+ (setq undo-auto--this-command-amalgamating nil)
+ (if amal
+ 'amalgamate
+ 'command))))
(defun undo-auto--amalgamate ()
"Amalgamate undo if necessary.