├── README.creole └── loader.el /README.creole: -------------------------------------------------------------------------------- 1 | = Loader = 2 | 3 | Emacs lacks a few simple load tools, this is a place to collect them. 4 | 5 | -------------------------------------------------------------------------------- /loader.el: -------------------------------------------------------------------------------- 1 | ;;; loader.el --- lisp loading tools 2 | 3 | ;; Copyright (C) 2013 Nic Ferrier 4 | 5 | ;; Author: Nic Ferrier 6 | ;; Keywords: lisp 7 | 8 | ;; This program is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation, either version 3 of the License, or 11 | ;; (at your option) any later version. 12 | 13 | ;; This program is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with this program. If not, see . 20 | 21 | ;;; Commentary: 22 | 23 | ;; Just a few useful loading tools for loading lisp files 24 | 25 | ;;; Code: 26 | 27 | (defun loader-load (local-file) 28 | "Load the LOCAL-FILE from the context directory. 29 | 30 | The context directory is the directory of the current load file." 31 | (let ((load-path 32 | (append load-path (list 33 | (file-name-directory 34 | (or (buffer-file-name) 35 | load-file-name 36 | default-directory)))))) 37 | (load local-file))) 38 | 39 | (provide 'loader) 40 | 41 | ;;; loader.el ends here 42 | --------------------------------------------------------------------------------