Kaynağa Gözat

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

Lukasz Janyst 9 yıl önce
ebeveyn
işleme
075477b9ce
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  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)))