Created
August 6, 2010 15:41
-
-
Save jasonm23/511503 to your computer and use it in GitHub Desktop.
dropins.el a simple way to load a collection of elisp libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Dropins | |
;; This extension provides a simple way to load a set of libraries | |
;; by placing them in a named folder. This is similar to the site-lisp | |
;; folder in the Emacs directory, however, Dropins defaults to a folder | |
;; within the user HONE. | |
;; | |
(defgroup dropins nil | |
"Library dropin folder" | |
:group 'convenience | |
) | |
(defcustom dropin-folder "~/.emacs.d/dropins" | |
"Library dropin folder, place your dropin .el libraries in this folder. | |
note that ELPA http://tromey.com/elpa/install.html would | |
be the best way to install libraries. But they must be | |
packaged properly." | |
:group 'dropins | |
:type 'string | |
) | |
(defvar dropin-folder 'dropin-folder | |
"Library dropin folder, place your dropin .el libraries in this folder. note that ELPA http://tromey.com/elpa/install.html would be the best way to install libraries. But they must be packaged properly.") | |
(defun load-dropins () "" | |
(interactive) | |
(loop for entry in (directory-files dropin-folder t) | |
when (equal ".el" (substring entry -3)) | |
do (load-library entry) | |
) | |
) | |
(load-dropins) | |
(provide 'dropins) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment