Explorar o código

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

Lukasz Janyst %!s(int64=9) %!d(string=hai) anos
pai
achega
075477b9ce
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/config.lisp

+ 3 - 1
src/config.lisp

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