Fix destructuring and other minor thinkos.
This commit is contained in:
parent
ae9d0b8273
commit
ed98a5bd69
3 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
|||
(defpackage :coleslaw-disqus
|
||||
(:use :cl)
|
||||
(:export #:enable)
|
||||
(:import-from :coleslaw #:add-injection))
|
||||
(:import-from :coleslaw #:add-injection
|
||||
#:post))
|
||||
|
||||
(in-package :coleslaw-disqus)
|
||||
|
||||
|
@ -24,4 +25,4 @@
|
|||
|
||||
(defun enable (&key shortname)
|
||||
(add-injection (list (format nil *disqus-header* shortname)
|
||||
(lambda (x) (typep x post))) :head))
|
||||
(lambda (x) (typep x 'post))) :body))
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
(defun load-plugins (plugins)
|
||||
"Compile and load the listed PLUGINS. It is expected that matching *.lisp files
|
||||
are in the plugins folder in coleslaw's source directory."
|
||||
(flet ((plugin-path (name)
|
||||
(flet ((plugin-path (sym)
|
||||
(app-path "plugins/~a" (string-downcase (symbol-name sym)))))
|
||||
(dolist (plugin plugins)
|
||||
(etypecase plugin
|
||||
|
|
|
@ -15,7 +15,7 @@ any return value other than nil indicates the injection should be added."
|
|||
|
||||
(defun find-injections (content)
|
||||
(flet ((injections-for (location)
|
||||
(loop for (injection . predicate) in (getf *injections* location)
|
||||
(loop for (injection predicate) in (getf *injections* location)
|
||||
when (funcall predicate content)
|
||||
collect injection)))
|
||||
(list :head (injections-for :head)
|
||||
|
|
Loading…
Add table
Reference in a new issue