From 8f6424cb50598ce742b146ec444e037ecfd606ae Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 17 Aug 2022 00:10:51 +0530 Subject: Move ennum-with-file-contents to top. * ennum.el (ennum-with-file-contents): Move to top. --- ennum.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ennum.el b/ennum.el index 2dfb888..bd0dd77 100644 --- a/ennum.el +++ b/ennum.el @@ -24,6 +24,15 @@ nil "List of hashes tracking current state of features.") +(defmacro ennum-with-file-contents (file &rest body) + "Create a temporary buffer, insert contents of FILE into that +buffer and evaluate BODY. The value returned is the value of the +last form in BODY." + (declare (indent defun)) + `(with-temp-buffer + (insert-file-contents ,file) + ,@body)) + ;; TODO: Should the store have an absolute path to deal with directory ;; changes? Yes, since we ask for an absolute working directory, we ;; should. @@ -285,15 +294,6 @@ the current state of all its variables." (defvar ennum-mandatory-metadata (list :title :date)) -(defmacro ennum-with-file-contents (file &rest body) - "Create a temporary buffer, insert contents of FILE into that -buffer and evaluate BODY. The value returned is the value of the -last form in BODY." - (declare (indent defun)) - `(with-temp-buffer - (insert-file-contents ,file) - ,@body)) - (defun ennum-directory-files (&optional directory full include-directories) "Return recursively the list of all files under DIRECTORY. Files are returned in depth first order. -- cgit v1.2.3