help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Form to store/recover buffer modified state?


From: Joakim Hove
Subject: Re: Form to store/recover buffer modified state?
Date: Wed, 03 Sep 2003 09:06:05 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux)

Jesper Harder <address@hidden> 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  / address@hidden  /  (55 5) 84076       |                 \
 | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
 | CMU                                                | 5231 Paradis    |
 \ Thormøhlensgt.55, 5020 Bergen.                     | 55 91 28 18     /
  \--------------------------------------------------------------------/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]