The answer is rather trivial:
(mapc 'load (file-expand-wildcards "~/some-lisp-files/*.el"))
But as suggested above, it's always better to load just the code you are certain of, not even because it's more secure to do so, but because it could be too annoying to debug it if you introduce an accidental change etc. Worse yet, if some of those files contain code which deletes some files you might not want to delete, or does some other things, which you generally don't want to happen automatically.
If anything, I'd go with something like this:
- Open Dired buffer in the directory you want to load files from.
- Maybe open recursively other directories with other Lisp files, or search Dired to get a list of files you want to load, using i for insert or M-x
find-dired
to search.
- Mark the files you actually want to load with commands like t or m or using masks * %.
- l to load all marked files.
Also, note that this will actually load the files (as per the title of your question), but you are more likely to be interested in require. This will also automatically load the proper version (either the source or the byte-compiled one). Also, it will take care of the proper loading order. But, you will have to spell out what exactly you want to require.
calendar-print-day-of-year
-- just add(require 'calendar)
in~/.emacs
. – Adobe Jan 21 '15 at 14:10calendar.el
was just an example. My question was about how to load everything. The question is not about whether I should do it or no. It was about how to do it. – Name Jan 21 '15 at 14:14