diff --git a/gnucash/report/report-core.scm b/gnucash/report/report-core.scm index 858b8c5a93..f563eaedde 100644 --- a/gnucash/report/report-core.scm +++ b/gnucash/report/report-core.scm @@ -28,6 +28,8 @@ (load-extension "libgncmod-report" "scm_init_sw_report_module")) (use-modules (sw_report)) +(use-modules (ice-9 match)) + ; Export the swig-wrapped symbols in the public interface of this module (let ((i (module-public-interface (current-module)))) (module-use! i (resolve-interface '(sw_report)))) @@ -120,14 +122,12 @@ not found."))) ;; set of options, and generates the report. the renderer must ;; return as its final value an object. - (let* ((report-rec - (let loop ((report-rec (make-report-template)) (args args)) - (cond - ((null? args) report-rec) - (else - ((record-modifier (car args)) - report-rec (cadr args)) - (loop report-rec (cddr args)))))) + (let* ((report-rec (let loop ((report-rec (make-report-template)) (args args)) + (match args + (() report-rec) + ((field val . rest) + ((record-modifier field) report-rec val) + (loop report-rec rest))))) (report-guid (gnc:report-template-report-guid report-rec)) (report-name (gnc:report-template-name report-rec))) (cond