aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-08-17 00:10:51 +0530
committerArun Isaac2022-08-17 00:51:55 +0530
commit8f6424cb50598ce742b146ec444e037ecfd606ae (patch)
tree3f206661c4612bd459f429a35900c016430d4312
parent6ab2e06bb396e9fdbd4f507ecf9283ef507bf748 (diff)
downloadennum-8f6424cb50598ce742b146ec444e037ecfd606ae.tar.gz
ennum-8f6424cb50598ce742b146ec444e037ecfd606ae.tar.lz
ennum-8f6424cb50598ce742b146ec444e037ecfd606ae.zip
Move ennum-with-file-contents to top.
* ennum.el (ennum-with-file-contents): Move to top.
-rw-r--r--ennum.el18
1 files 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.