From 3ada2f1ef9a4f7de96287169c4c966cead561b11 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 31 Aug 1998 13:37:39 +0000 Subject: [PATCH] (with-temp-file): Must use old forms. --- emu.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/emu.el b/emu.el index 493c773..2b07a12 100644 --- a/emu.el +++ b/emu.el @@ -293,18 +293,18 @@ The value of the last form in FORMS is returned, like `progn'. See also `with-temp-buffer'." (let ((temp-file (make-symbol "temp-file")) (temp-buffer (make-symbol "temp-buffer"))) - `(let ((,temp-file ,file) - (,temp-buffer - (get-buffer-create (generate-new-buffer-name " *temp file*")))) - (unwind-protect - (prog1 - (with-current-buffer ,temp-buffer - ,@forms) - (with-current-buffer ,temp-buffer - (widen) - (write-region (point-min) (point-max) ,temp-file nil 0))) - (and (buffer-name ,temp-buffer) - (kill-buffer ,temp-buffer)))))) + (` (let (((, temp-file) (, file)) + ((, temp-buffer) + (get-buffer-create (generate-new-buffer-name " *temp file*")))) + (unwind-protect + (prog1 + (with-current-buffer (, temp-buffer) + (,@ forms)) + (with-current-buffer (, temp-buffer) + (widen) + (write-region (point-min) (point-max) (, temp-file) nil 0))) + (and (buffer-name (, temp-buffer)) + (kill-buffer (, temp-buffer)))))))) ;; This macro was imported Emacs 20.2. (defmacro-maybe with-temp-buffer (&rest forms) -- 1.7.10.4