From ecb6938ba4b1ac2faf76e420ffa221a7d452e0a8 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 10 Oct 2023 00:06:36 +0200
Subject: atom, html: rename internals to %*

---
 src/atom.scm | 52 ++++++++++++++++++++++++++--------------------------
 src/html.scm | 42 +++++++++++++++++++++---------------------
 2 files changed, 47 insertions(+), 47 deletions(-)

(limited to 'src')

diff --git a/src/atom.scm b/src/atom.scm
index 9f363f7..13bb89f 100644
--- a/src/atom.scm
+++ b/src/atom.scm
@@ -18,7 +18,7 @@
 
 ;; Entities
 (define-record-type <feed>
-  (make-feed id title subtitle uri updated entries)
+  (%make-feed id title subtitle uri updated entries)
   feed?
   (id feed-id)
   (title feed-title)
@@ -28,7 +28,7 @@
   (entries feed-entries set-feed-entries!))
 
 (define-record-type <entry>
-  (make-entry id title published updated authors summary content categories contributors media)
+  (%make-entry id title published updated authors summary content categories contributors media)
   entry?
   (id entry-id set-entry-id!)
   (title entry-title)
@@ -42,7 +42,7 @@
   (media entry-media))
 
 (define-record-type <media>
-  (make-media title type length uri path)
+  (%make-media title type length uri path)
   media?
   (title media-title)
   (type media-type)
@@ -51,7 +51,7 @@
   (path media-path))
 
 (define-record-type <person>
-  (make-person name email uri)
+  (%make-person name email uri)
   person?
   (name person-name)
   (email person-email)
@@ -71,12 +71,12 @@
                      (uri        "")
                      (posts     '())
                #:allow-other-keys)
-  (let* ((f (make-feed uri
-                       title
-                       subtitle
-                       uri
-                       (find-newest (map entry-updated posts))
-                       '()))
+  (let* ((f (%make-feed uri
+                        title
+                        subtitle
+                        uri
+                        (find-newest (map entry-updated posts))
+                        '()))
          (append-entry! (partial append-feed-entry! f)))
     (for-each append-entry!
               (sort posts date>?))
@@ -99,21 +99,21 @@
                   (if (char-set-contains? char-set:letter c) c #\-))
                 title))
 
-  (make-entry (or id (id-from-title title))
-              title
-              published
-              (find-newest (list published updated))
-              authors
-              summary-html
-              content-html
-              categories
-              contributors
-              media))
+  (%make-entry (or id (id-from-title title))
+               title
+               published
+               (find-newest (list published updated))
+               authors
+               summary-html
+               content-html
+               categories
+               contributors
+               media))
 
 (define* (person name #:key (email "")
                             (uri   "")
                       #:allow-other-keys)
-  (make-person name email uri))
+  (%make-person name email uri))
 
 
 (define* (media path #:key (title "")
@@ -124,11 +124,11 @@
            (type (assoc-ref mime-types extension)))
       (if (string? type) type (throw "Unknown mime-type"))))
   (let ((contents (call-with-input-file path get-bytevector-all #:binary #t)))
-    (make-media title
-                (type path)
-                (bytevector-length contents)
-                uri
-                path)))
+    (%make-media title
+                 (type path)
+                 (bytevector-length contents)
+                 uri
+                 path)))
 
 ;; Rendering
 (define (render-person tag person)
diff --git a/src/html.scm b/src/html.scm
index a6bdd13..7099318 100644
--- a/src/html.scm
+++ b/src/html.scm
@@ -12,7 +12,7 @@
             js))
 
 (define-record-type <index>
-  (make-index title short-description long-description uri atom-feed-uri author posts styles scripts)
+  (%make-index title short-description long-description uri atom-feed-uri author posts styles scripts)
   index?
   (title index-title)
   (short-description index-short-description)
@@ -25,16 +25,16 @@
   (scripts index-scripts))
 
 (define-record-type <post>
-  (make-post id
-             title
-             published
-             updated
-             authors
-             summary-html
-             content-html
-             categories
-             contributors
-             media)
+  (%make-post id
+              title
+              published
+              updated
+              authors
+              summary-html
+              content-html
+              categories
+              contributors
+              media)
   post?
   (id post-id)
   (title post-title)
@@ -48,14 +48,14 @@
   (media post-media))
 
 (define-record-type <media>
-  (make-media type uri path)
+  (%make-media type uri path)
   media?
   (type media-type)
   (uri media-uri)
   (path media-path))
 
 (define-record-type <person>
-  (make-person name email uri)
+  (%make-person name email uri)
   person?
   (name person-name)
   (email person-email)
@@ -72,7 +72,7 @@
                       (styles '())
                       (scripts '())
                 #:allow-other-keys)
-         (make-index
+         (%make-index
            title
            short-description
            long-description
@@ -100,9 +100,9 @@
     (string-map (lambda (c)
                   (if (char-set-contains? char-set:letter c) c #\-))
                 title))
-  (make-post (or id (id-from-title title))
-             title
-             published
+  (%make-post (or id (id-from-title title))
+              title
+              published
               (find-newest (list published updated))
               authors
               summary-html
@@ -118,14 +118,14 @@
            (type (assoc-ref mime-types extension)))
       (if (string? type) type (throw "Unknown mime-type"))))
 
-  (make-media (type path)
-              uri
-              path))
+  (%make-media (type path)
+               uri
+               path))
 
 (define* (person name #:key (email "")
                             (uri   "")
                       #:allow-other-keys)
-  (make-person name email uri))
+  (%make-person name email uri))
 
 ; Rendering
 (define (render-author author)
-- 
cgit v1.2.3