emacs: Rework configuration
This commit is contained in:
parent
79bb2f7c9c
commit
0abac2afd1
20 changed files with 105 additions and 113 deletions
13
modules/home/caem/development/emacs/emacs.d/rei.el
Normal file
13
modules/home/caem/development/emacs/emacs.d/rei.el
Normal file
|
@ -0,0 +1,13 @@
|
|||
(provide 'rei)
|
||||
|
||||
(defun rei/load (path)
|
||||
"Load a configuraion file relative to the current file.
|
||||
When the specified path is a directory it will look for a init.el file to load."
|
||||
(when load-file-name
|
||||
(let ((fp (file-name-concat (file-name-directory load-file-name) path)))
|
||||
(if (file-directory-p fp)
|
||||
(let ((fdp (file-name-concat fp "init.el")))
|
||||
(if (file-exists-p fdp)
|
||||
(load fdp)
|
||||
(error "Cannot load %s directory as it's missing an init.el file." path)))
|
||||
(load fp)))))
|
Loading…
Add table
Add a link
Reference in a new issue