From a67a08d54a6122cfd1f7bcaf1f0272777496928e Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Tue, 6 May 2014 15:19:43 -0400 Subject: [PATCH] Use some more format recipes. --- src/documents.lisp | 5 ++--- src/themes.lisp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/documents.lisp b/src/documents.lisp index dd6c789..ac809df 100644 --- a/src/documents.lisp +++ b/src/documents.lisp @@ -15,10 +15,9 @@ (defgeneric discover (doc-type) (:documentation "Load all documents of the given DOC-TYPE into memory.") (:method (doc-type) - (let* ((class-name (class-name doc-type)) - (file-type (string-downcase (symbol-name class-name)))) + (let ((file-type (format nil "~(~A~)" (class-name doc-type)))) (do-files (file (repo *config*) file-type) - (let ((obj (construct class-name (read-content file)))) + (let ((obj (construct (class-name doc-type) (read-content file)))) (add-document obj)))))) (defmethod discover :before (doc-type) diff --git a/src/themes.lisp b/src/themes.lisp index c042d8e..1d7947c 100644 --- a/src/themes.lisp +++ b/src/themes.lisp @@ -29,7 +29,7 @@ any return value other than nil indicates the injection should be added." (defun theme-package (name) "Find the package matching the theme NAME or signal THEME-DOES-NOT-EXIST." - (or (find-package (string-upcase (concatenate 'string "coleslaw.theme." name))) + (or (find-package (format nil "~:@(coleslaw.theme.~A~)" name)) (error 'theme-does-not-exist :theme name))) (defun theme-fn (name &optional (package (theme *config*)))