summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tissue/web/themes.scm14
-rw-r--r--tissue/web/themes/default.scm7
2 files changed, 6 insertions, 15 deletions
diff --git a/tissue/web/themes.scm b/tissue/web/themes.scm
index 21de09b..648d4d5 100644
--- a/tissue/web/themes.scm
+++ b/tissue/web/themes.scm
@@ -1,5 +1,5 @@
;;; tissue --- Text based issue tracker
-;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of tissue.
;;;
@@ -28,8 +28,7 @@
search-page-matched-open-issues
search-page-matched-closed-issues
search-page-matched-documents
- search-page-matched-commits
- add-methods))
+ search-page-matched-commits))
(define-class <search-page> ()
(uri #:getter search-page-uri #:init-keyword #:uri)
@@ -41,12 +40,3 @@
(matched-closed-issues #:getter search-page-matched-closed-issues #:init-keyword #:matched-closed-issues)
(matched-documents #:getter search-page-matched-documents #:init-keyword #:matched-documents)
(matched-commits #:getter search-page-matched-commits #:init-keyword #:matched-commits))
-
-(define (add-methods generic . methods)
- "Add @var{methods} to @var{generic} function. This is purely
-functional and operates on a copy of @var{generic}. It does not mutate
-@var{generic}."
- (let ((clone (shallow-clone generic)))
- (for-each (cut add-method! generic <>)
- methods)
- clone))
diff --git a/tissue/web/themes/default.scm b/tissue/web/themes/default.scm
index 7ab8c89..10732ee 100644
--- a/tissue/web/themes/default.scm
+++ b/tissue/web/themes/default.scm
@@ -1,5 +1,5 @@
;;; tissue --- Text based issue tracker
-;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of tissue.
;;;
@@ -113,10 +113,11 @@ theme.
@var{title} is the title to use in the head of the HTML. @var{css} is
a URI to a CSS stylesheet to link to. If it is @code{#f}, no
stylesheet is linked to."
- (add-methods render-sxml
+ (add-method! render-sxml
(make <method>
#:specializers (list <search-page-head> <search-page>)
- #:procedure (make-head-renderer title css))))
+ #:procedure (make-head-renderer title css)))
+ render-sxml)
(define-method (render-sxml (page <search-page>))
"Return SXML for @var{page}, a @code{<search-page>}."