diff --git a/gnucash/report/html-text.scm b/gnucash/report/html-text.scm index d34e2154bf..94a04d4205 100644 --- a/gnucash/report/html-text.scm +++ b/gnucash/report/html-text.scm @@ -21,6 +21,7 @@ ;; Boston, MA 02110-1301, USA gnu@gnu.org ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(use-modules (srfi srfi-9)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; class @@ -30,35 +31,25 @@ ;; doc as arg to get the string out. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define - (make-record-type "" - '(body style))) -(define gnc:html-text? - (record-predicate )) +(define-record-type + (make-html-text body style) + html-text? + (body html-text-body html-text-set-body!) + (style html-text-style html-text-set-style!)) -(define gnc:make-html-text-internal - (record-constructor )) +(define gnc:html-text? html-text?) +(define gnc:make-html-text-internal make-html-text) +(define gnc:html-text-body html-text-body) +(define gnc:html-text-set-body-internal! html-text-set-body!) +(define gnc:html-text-style html-text-style) +(define gnc:html-text-set-style-internal! html-text-set-style!) (define (gnc:make-html-text . body) - (gnc:make-html-text-internal - body - (gnc:make-html-style-table))) - -(define gnc:html-text-body - (record-accessor 'body)) - -(define gnc:html-text-set-body-internal! - (record-modifier 'body)) + (gnc:make-html-text-internal body (gnc:make-html-style-table))) (define (gnc:html-text-set-body! txt . rest) (gnc:html-text-set-body-internal! txt rest)) -(define gnc:html-text-style - (record-accessor 'style)) - -(define gnc:html-text-set-style-internal! - (record-modifier 'style)) - (define (gnc:html-text-set-style! text tag . rest) (let ((newstyle (if (and (= (length rest) 2) (procedure? (car rest))) (apply gnc:make-html-data-style-info rest)