[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recent change of lm-with-file in emacs-lisp/lisp-mnt.el.
From: |
Richard Stallman |
Subject: |
Re: Recent change of lm-with-file in emacs-lisp/lisp-mnt.el. |
Date: |
Thu, 25 Sep 2003 19:20:07 -0400 |
Maybe the change can be fixed so that lm-with-file handles FILE == nil
as before?
Does this work right?
(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))
(if ,filesym
(with-temp-buffer
(insert-file-contents ,filesym)
,@body)
,@body))))