Browse Source

Use some more format recipes.

Brit Butler 11 years ago
parent
commit
a67a08d54a
2 changed files with 3 additions and 4 deletions
  1. 2 3
      src/documents.lisp
  2. 1 1
      src/themes.lisp

+ 2 - 3
src/documents.lisp

15
 (defgeneric discover (doc-type)
15
 (defgeneric discover (doc-type)
16
   (:documentation "Load all documents of the given DOC-TYPE into memory.")
16
   (:documentation "Load all documents of the given DOC-TYPE into memory.")
17
   (:method (doc-type)
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
       (do-files (file (repo *config*) file-type)
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
           (add-document obj))))))
21
           (add-document obj))))))
23
 
22
 
24
 (defmethod discover :before (doc-type)
23
 (defmethod discover :before (doc-type)

+ 1 - 1
src/themes.lisp

29
 
29
 
30
 (defun theme-package (name)
30
 (defun theme-package (name)
31
   "Find the package matching the theme NAME or signal THEME-DOES-NOT-EXIST."
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
       (error 'theme-does-not-exist :theme name)))
33
       (error 'theme-does-not-exist :theme name)))
34
 
34
 
35
 (defun theme-fn (name &optional (package (theme *config*)))
35
 (defun theme-fn (name &optional (package (theme *config*)))