From 32a69b4312621f5119377b25d3e6ab8fa5e804e8 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 28 Mar 2025 02:23:16 +0000 Subject: doc: Add identifiers for individual record fields. * doc/skribilo.scm (record-documentation): Add identifiers for individual record fields. --- doc/skribilo.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/skribilo.scm b/doc/skribilo.scm index 7c75d97..bd2c313 100644 --- a/doc/skribilo.scm +++ b/doc/skribilo.scm @@ -268,24 +268,27 @@ are a list of <record-field> objects." (code identifier)))) (apply description (map (lambda (documented-field) - (let* ((identifier (record-field-identifier documented-field)) + (let* ((field-identifier (record-field-identifier documented-field)) (record-field (find (lambda (field) (eq? (record-field-identifier field) - (string->symbol identifier))) + (string->symbol field-identifier))) (record-fields record)))) - (item #:key + (item #:ident (string-append identifier + "-" + field-identifier) + #:key (cond ;; No default value ((no-default? (record-field-default record-field)) - (code identifier)) + (code field-identifier)) ;; Default value in documentation ((record-field-default documented-field) => (lambda (default) - (list (append (list (code identifier) " (Default: ") + (list (append (list (code field-identifier) " (Default: ") default (list ")"))))) ;; Default value from the source - (else (list (list (code identifier) " (Default: " + (else (list (list (code field-identifier) " (Default: " (code (expression->string (record-field-default record-field))) ")")))) -- cgit v1.2.3