From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joakim Hove Newsgroups: gmane.emacs.help Subject: Re: Form to store/recover buffer modified state? Date: Wed, 03 Sep 2003 09:06:05 +0200 Organization: University of Bergen Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <4yhe3uz6zm.fsf@skjellgran.ii.uib.no> References: <4yznhtczpt.fsf@skjellgran.ii.uib.no> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1062636827 15725 80.91.224.253 (4 Sep 2003 00:53:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Sep 2003 00:53:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 04 02:53:45 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19uiNd-0002ZQ-00 for ; Thu, 04 Sep 2003 02:53:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19uiNK-0001t4-GD for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2003 20:53:26 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!uninett.no!nntp.uib.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: skjellgran.ii.uib.no Original-X-Trace: toralf.uib.no 1062572765 99385 129.177.20.52 (3 Sep 2003 07:06:05 GMT) Original-X-Complaints-To: abuse@uib.no Original-NNTP-Posting-Date: 3 Sep 2003 07:06:05 GMT User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:rWHBmdfNpzGMZz27OIBWb2y5SUY= Original-Xref: shelby.stanford.edu gnu.emacs.help:116337 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12256 Jesper Harder writes: > (defmacro save-modified (&rest body) > (let ((temp (make-symbol "modified"))) > `(let ((,temp (buffer-modified-p))) > (unwind-protect > (progn > ,@body) > (unless ,temp > (set-buffer-modified-p nil)))))) Thanks a lot, it works like intended, but (e)lisp code containing the "magic" characters "@", "," and "`" is beyond me. I will try to decipher it and see what I can learn! Thanks again :-) Joakim -- /--------------------------------------------------------------------\ / Joakim Hove / hove@bccs.no / (55 5) 84076 | \ | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 | | CMU | 5231 Paradis | \ Thormøhlensgt.55, 5020 Bergen. | 55 91 28 18 / \--------------------------------------------------------------------/