Allow for plug-ins to be defined in the user repo

This commit is contained in:
Lukasz Janyst 2015-12-03 12:09:14 +01:00
parent 44eb77da2c
commit 075477b9ce

View file

@ -49,7 +49,9 @@
(defun enable-plugin (name args) (defun enable-plugin (name args)
"Given a plugin, NAME, compile+load it and call its ENABLE function with ARGS." "Given a plugin, NAME, compile+load it and call its ENABLE function with ARGS."
(flet ((plugin-path (sym) (flet ((plugin-path (sym)
(app-path "plugins/~(~A~)" sym)) (if (probe-file (repo-path "plugins/~(~A~).lisp" sym))
(repo-path "plugins/~(~A~)" sym)
(app-path "plugins/~(~A~)" sym)))
(plugin-package (sym) (plugin-package (sym)
(format nil "~:@(coleslaw-~A~)" sym))) (format nil "~:@(coleslaw-~A~)" sym)))
(let ((file (plugin-path name))) (let ((file (plugin-path name)))