[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp-mnt.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp-mnt.el |
Date: |
Tue, 30 Sep 2003 08:47:05 -0400 |
Index: emacs/lisp/emacs-lisp/lisp-mnt.el
diff -c emacs/lisp/emacs-lisp/lisp-mnt.el:1.42
emacs/lisp/emacs-lisp/lisp-mnt.el:1.43
*** emacs/lisp/emacs-lisp/lisp-mnt.el:1.42 Mon Sep 22 11:23:53 2003
--- emacs/lisp/emacs-lisp/lisp-mnt.el Tue Sep 30 08:47:04 2003
***************
*** 297,308 ****
(defmacro lm-with-file (file &rest body)
"Execute BODY in a buffer containing the contents of FILE.
! If FILE is nil, just return nil."
(let ((filesym (make-symbol "file")))
`(let ((,filesym ,file))
! (when ,filesym
! (with-temp-buffer
! (insert-file-contents ,filesym)
,@body)))))
(put 'lm-with-file 'lisp-indent-function 1)
(put 'lm-with-file 'edebug-form-spec t)
--- 297,310 ----
(defmacro lm-with-file (file &rest body)
"Execute BODY in a buffer containing the contents of FILE.
! If FILE is nil, execute BODY in the current buffer."
(let ((filesym (make-symbol "file")))
`(let ((,filesym ,file))
! (if ,filesym
! (with-temp-buffer
! (insert-file-contents ,filesym)
! ,@body)
! (save-excursion
,@body)))))
(put 'lm-with-file 'lisp-indent-function 1)
(put 'lm-with-file 'edebug-form-spec t)