Преглед изворни кода

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

Lukasz Janyst пре 9 година
родитељ
комит
075477b9ce
1 измењених фајлова са 3 додато и 1 уклоњено
  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)))