aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Brautaset <stig@brautaset.org>2016-02-29 09:41:11 +0000
committerStig Brautaset <stig@brautaset.org>2016-02-29 09:41:11 +0000
commit9d7a4bd002efd57e80e96fc842ab133e466461ab (patch)
treeb0dba1460dbdc5109c438ae0fa88c1beaddcced5
parentbf02ab085222d12452316a37608aeacc6d118ce6 (diff)
Use let rather than setq in build helper script
-rw-r--r--tangle-org-files.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/tangle-org-files.el b/tangle-org-files.el
index c46b112..548d219 100644
--- a/tangle-org-files.el
+++ b/tangle-org-files.el
@@ -1,9 +1,13 @@
(require 'org)
;; Find our current directory.
-(setq dir (file-name-directory (or (buffer-file-name) load-file-name)))
+(let* ((dir (file-name-directory (or (buffer-file-name) load-file-name)))
+ (test-dir (expand-file-name "test" dir)))
-;; Generate *.el files from *.org files in `.' and the `test/' directories.
-;; No doubt this could be done in one statement, but my elisp-fu is not very strong yet.
-(mapc #'org-babel-load-file (directory-files dir t "ox-.*\\.org$"))
-(mapc #'org-babel-load-file (directory-files (expand-file-name "test" dir) t "ox-.*\\.org$"))
+ ;; Tangle source files
+ (mapc #'org-babel-load-file
+ (directory-files dir t "ox-.*\\.org$"))
+
+ ;; Tangle test files
+ (mapc #'org-babel-load-file
+ (directory-files test-dir t "ox-.*\\.org$")))