summaryrefslogtreecommitdiffstats
path: root/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir')
-rw-r--r--emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir b/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir
new file mode 100644
index 0000000..2859cbd
--- /dev/null
+++ b/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir
@@ -0,0 +1,6 @@
+#name : traversing a directory
+#contributor : Xah Lee
+# --
+;; apply a function to all files in a dir
+(require 'find-lisp)
+(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$"))