Parcourir la Source

Use some more format recipes.

Brit Butler il y a 11 ans
Parent
commit
a67a08d54a
2 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. 2 3
      src/documents.lisp
  2. 1 1
      src/themes.lisp

+ 2 - 3
src/documents.lisp

@@ -15,10 +15,9 @@
15 15
 (defgeneric discover (doc-type)
16 16
   (:documentation "Load all documents of the given DOC-TYPE into memory.")
17 17
   (:method (doc-type)
18
-    (let* ((class-name (class-name doc-type))
19
-           (file-type (string-downcase (symbol-name class-name))))
18
+    (let ((file-type (format nil "~(~A~)" (class-name doc-type))))
20 19
       (do-files (file (repo *config*) file-type)
21
-        (let ((obj (construct class-name (read-content file))))
20
+        (let ((obj (construct (class-name doc-type) (read-content file))))
22 21
           (add-document obj))))))
23 22
 
24 23
 (defmethod discover :before (doc-type)

+ 1 - 1
src/themes.lisp

@@ -29,7 +29,7 @@ any return value other than nil indicates the injection should be added."
29 29
 
30 30
 (defun theme-package (name)
31 31
   "Find the package matching the theme NAME or signal THEME-DOES-NOT-EXIST."
32
-  (or (find-package (string-upcase (concatenate 'string "coleslaw.theme." name)))
32
+  (or (find-package (format nil "~:@(coleslaw.theme.~A~)" name))
33 33
       (error 'theme-does-not-exist :theme name)))
34 34
 
35 35
 (defun theme-fn (name &optional (package (theme *config*)))