From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: undoing changes automatically Date: Mon, 12 Nov 2007 22:21:21 +0100 Message-ID: <18232.50129.24712.310255@tfkp07.physik.uni-erlangen.de> References: <18231.43165.842097.720674@tfkp07.physik.uni-erlangen.de> <853avbp6ie.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194902505 29971 80.91.229.12 (12 Nov 2007 21:21:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2007 21:21:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 12 22:21:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Irgj7-0001nJ-92 for ged-emacs-devel@m.gmane.org; Mon, 12 Nov 2007 22:21:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irgiv-00042v-0b for ged-emacs-devel@m.gmane.org; Mon, 12 Nov 2007 16:21:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Irgiq-00042L-32 for emacs-devel@gnu.org; Mon, 12 Nov 2007 16:21:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Irgio-000422-Ng for emacs-devel@gnu.org; Mon, 12 Nov 2007 16:21:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irgio-00041z-GX for emacs-devel@gnu.org; Mon, 12 Nov 2007 16:21:30 -0500 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Irgii-0008F4-Je; Mon, 12 Nov 2007 16:21:24 -0500 Original-Received: from tfkp07.physik.uni-erlangen.de (tfkp07.physik.uni-erlangen.de [131.188.164.207]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 74567213A8; Mon, 12 Nov 2007 22:21:21 +0100 (CET) In-Reply-To: <853avbp6ie.fsf@lola.goethe.zz> X-Mailer: VM 7.19 under Emacs 22.1.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83085 Archived-At: On Mon Nov 12 2007 David Kastrup wrote: > > So I want to put the call to undo in the code such that it undoes > > all the formatting before it throws the error. > > atomic-change-group is a Lisp macro in `subr.el'. > (atomic-change-group &rest BODY) > > Perform BODY as an atomic change group. > This means that if BODY exits abnormally, > all of its changes to the current buffer are undone. > This works regardless of whether undo is enabled in the buffer. Perfect, thanks. It seems that this does exactly what I want. Roland