aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/subr.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 24bd28839fc..00bab70e8a3 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2586,7 +2586,7 @@ is nil and `use-dialog-box' is non-nil."
2586;;; Atomic change groups. 2586;;; Atomic change groups.
2587 2587
2588(defmacro atomic-change-group (&rest body) 2588(defmacro atomic-change-group (&rest body)
2589 "Perform BODY as an atomic change group. 2589 "Like `progn' but perform BODY as an atomic change group.
2590This means that if BODY exits abnormally, 2590This means that if BODY exits abnormally,
2591all of its changes to the current buffer are undone. 2591all of its changes to the current buffer are undone.
2592This works regardless of whether undo is enabled in the buffer. 2592This works regardless of whether undo is enabled in the buffer.
@@ -2609,8 +2609,8 @@ user can undo the change normally."
2609 ;; it enables undo if that was disabled; we need 2609 ;; it enables undo if that was disabled; we need
2610 ;; to make sure that it gets disabled again. 2610 ;; to make sure that it gets disabled again.
2611 (activate-change-group ,handle) 2611 (activate-change-group ,handle)
2612 ,@body 2612 (prog1 ,(macroexp-progn body)
2613 (setq ,success t)) 2613 (setq ,success t)))
2614 ;; Either of these functions will disable undo 2614 ;; Either of these functions will disable undo
2615 ;; if it was disabled before. 2615 ;; if it was disabled before.
2616 (if ,success 2616 (if ,success