Skip to content

Instantly share code, notes, and snippets.

@bradwright
Created February 16, 2012 08:00
Show Gist options
  • Save bradwright/1843114 to your computer and use it in GitHub Desktop.
Save bradwright/1843114 to your computer and use it in GitHub Desktop.
Get all directories under a certain one
;; add all theme directories to the `custom-theme-load-path`
;; directory automatically so `load-theme` can find them.
(let ((base "/home/user/.emacs.d/vendor/themes"))
(add-to-list 'custom-theme-load-path base)
(dolist (f (directory-files base))
(let ((name (concat base "/" f)))
(when (and (file-directory-p name)
(not (equal f ".."))
(not (equal f ".")))
(add-to-list 'custom-theme-load-path name)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment