[PATCH 11/13] fix a number of scheme syntax errors

Andy Wingo wingo at pobox.com
Mon Mar 29 17:31:58 EDT 2010


This kind of error is detected "eagerly" in Guile 2.0.
---
 src/app-utils/config-var.scm                       |    2 +-
 src/app-utils/options.scm                          |    6 +++---
 src/report/report-system/html-table.scm            |    3 ++-
 src/report/standard-reports/balance-sheet.scm      |   13 ++++---------
 .../standard-reports/budget-balance-sheet.scm      |   13 ++++---------
 src/report/standard-reports/equity-statement.scm   |   13 ++++---------
 src/report/standard-reports/trial-balance.scm      |   13 ++++---------
 7 files changed, 22 insertions(+), 41 deletions(-)

diff --git a/src/app-utils/config-var.scm b/src/app-utils/config-var.scm
index d33ae32..4ee8e1b 100644
--- a/src/app-utils/config-var.scm
+++ b/src/app-utils/config-var.scm
@@ -68,7 +68,7 @@
 (define (gnc:config-var-value-is-default? var)
   (if (not (gnc:config-var-modified? var))
       #t
-      (let (equal-values? gnc:config-var-equality-func-get var)
+      (let ((equal-values? (gnc:config-var-equality-func-get var)))
         (equal-values? 
          (gnc:config-var-default-value-get var)
          (gnc:config-var-value-get var)))))
diff --git a/src/app-utils/options.scm b/src/app-utils/options.scm
index b248739..7795a3f 100644
--- a/src/app-utils/options.scm
+++ b/src/app-utils/options.scm
@@ -841,7 +841,7 @@
 
   (define (multichoice-strings p-vals)
     (if (null? p-vals)
-        ()
+        '()
         (cons (vector-ref (car p-vals) 1)
               (cons (vector-ref (car p-vals) 2)
                     (multichoice-strings (cdr p-vals))))))
@@ -927,7 +927,7 @@
 
   (define (radiobutton-strings p-vals)
     (if (null? p-vals)
-        ()
+        '()
         (cons (vector-ref (car p-vals) 1)
               (cons (vector-ref (car p-vals) 2)
                     (radiobutton-strings (cdr p-vals))))))
@@ -992,7 +992,7 @@
 
   (define (list-strings p-vals)
     (if (null? p-vals)
-        ()
+        '()
         (cons (vector-ref (car p-vals) 1)
               (cons (vector-ref (car p-vals) 2)
                     (list-strings (cdr p-vals))))))
diff --git a/src/report/report-system/html-table.scm b/src/report/report-system/html-table.scm
index 0d8c625..5eb4299 100644
--- a/src/report/report-system/html-table.scm
+++ b/src/report/report-system/html-table.scm
@@ -567,7 +567,8 @@
   ;; returns a pair, the car of which is the prepending of newcol
   ;; and existing-data, and the cdr is the remaining elements of newcol
   (define (prepend-to-element newcol existing-data length-to-append)
-    (if (= length-to-append 0) ('() . newcol)
+    (if (= length-to-append 0)
+        (cons '() newcol)
         (let* 
             ((current-new (car newcol))
              (current-existing (car existing-data))
diff --git a/src/report/standard-reports/balance-sheet.scm b/src/report/standard-reports/balance-sheet.scm
index 1116d05..6bcb4cd 100644
--- a/src/report/standard-reports/balance-sheet.scm
+++ b/src/report/standard-reports/balance-sheet.scm
@@ -714,15 +714,10 @@
 	  ;; however, this still doesn't seem to get around the
 	  ;; colspan bug... cf. gnc:colspans-are-working-right
 	  (if filename
-	      (let* ((port (open-output-file filename))
-		     (gnc:display-report-list-item
-		      (list doc) port " balance-sheet.scm ")
-		     (close-output-port port)
-		     )
-		)
-	      )
-	  )
-	)
+	      (let* ((port (open-output-file filename)))
+                (gnc:display-report-list-item
+                 (list doc) port " balance-sheet.scm ")
+                (close-output-port port)))))
     
     (gnc:report-finished)
     
diff --git a/src/report/standard-reports/budget-balance-sheet.scm b/src/report/standard-reports/budget-balance-sheet.scm
index 23e644b..4513ecf 100644
--- a/src/report/standard-reports/budget-balance-sheet.scm
+++ b/src/report/standard-reports/budget-balance-sheet.scm
@@ -907,15 +907,10 @@
 	  ;; however, this still doesn't seem to get around the
 	  ;; colspan bug... cf. gnc:colspans-are-working-right
 	  (if filename
-	      (let* ((port (open-output-file filename))
-		     (gnc:display-report-list-item
-		      (list doc) port " budget-balance-sheet.scm ")
-		     (close-output-port port)
-		     )
-		)
-	      )
-	  )
-	))) ;; end cond
+	      (let* ((port (open-output-file filename)))
+                (gnc:display-report-list-item
+                 (list doc) port " budget-balance-sheet.scm ")
+                (close-output-port port)))))))
     
     (gnc:report-finished)
     
diff --git a/src/report/standard-reports/equity-statement.scm b/src/report/standard-reports/equity-statement.scm
index 28144fe..d1b0640 100644
--- a/src/report/standard-reports/equity-statement.scm
+++ b/src/report/standard-reports/equity-statement.scm
@@ -673,15 +673,10 @@
 	  ;; however, this still doesn't seem to get around the
 	  ;; colspan bug... cf. gnc:colspans-are-working-right
 	  (if filename
-	      (let* ((port (open-output-file filename))
-		     (gnc:display-report-list-item
-		      (list doc) port " equity-statement.scm ")
-		     (close-output-port port)
-		     )
-		)
-	      )
-	  )
-	)
+	      (let* ((port (open-output-file filename)))
+                (gnc:display-report-list-item
+                 (list doc) port " equity-statement.scm ")
+                (close-output-port port)))))
     
     (gnc:report-finished)
     
diff --git a/src/report/standard-reports/trial-balance.scm b/src/report/standard-reports/trial-balance.scm
index f9ff4e5..782067b 100644
--- a/src/report/standard-reports/trial-balance.scm
+++ b/src/report/standard-reports/trial-balance.scm
@@ -1126,15 +1126,10 @@
 	  ;; however, this still doesn't seem to get around the
 	  ;; colspan bug... cf. gnc:colspans-are-working-right
 	  (if filename
-	      (let* ((port (open-output-file filename))
-		     (gnc:display-report-list-item
-		      (list doc) port " trial-balance.scm ")
-		     (close-output-port port)
-		     )
-		)
-	      )
-	  )
-	)
+	      (let* ((port (open-output-file filename)))
+                (gnc:display-report-list-item
+                 (list doc) port " trial-balance.scm ")
+                (close-output-port port)))))
     
     (gnc:report-finished)
     
-- 
1.6.2.5


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0012-make-sure-that-printf-is-available-whereever-it-is-u.patch



More information about the gnucash-devel mailing list