# HG changeset patch # User Richard M. Stallman # Date 1053270264 0 # Node ID 4441e202a6f4367845eadff2399244089a388848 # Parent a8a706365aafa116de9800f3bad6afb0c9fac084 (prepare-change-group): Reinstate BUFFER arg; make it work. diff -r a8a706365aaf -r 4441e202a6f4 lisp/subr.el --- a/lisp/subr.el Sun May 18 05:29:38 2003 +0000 +++ b/lisp/subr.el Sun May 18 15:04:24 2003 +0000 @@ -1242,8 +1242,9 @@ (accept-change-group ,handle) (cancel-change-group ,handle)))))) -(defun prepare-change-group () +(defun prepare-change-group (&optional buffer) "Return a handle for the current buffer's state, for a change group. +If you specify BUFFER, make a handle for BUFFER's state instead. Pass the handle to `activate-change-group' afterward to initiate the actual changes of the change group. @@ -1269,7 +1270,9 @@ call to `activate-change-group' and finish it with a single call to `accept-change-group' or `cancel-change-group'." - (list (cons (current-buffer) buffer-undo-list))) + (if buffer + (list (cons buffer (with-current-buffer buffer buffer-undo-list))) + (list (cons (current-buffer) buffer-undo-list)))) (defun activate-change-group (handle) "Activate a change group made with `prepare-change-group' (which see)."