~ chicken-core (chicken-5) 2cf46d1933e08773d12078c7d53d6528ed7cdf7a


commit 2cf46d1933e08773d12078c7d53d6528ed7cdf7a
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Jun 3 20:09:16 2010 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Thu Jun 3 20:09:16 2010 +0200

    made d debug symbol a macro

diff --git a/common-declarations.scm b/common-declarations.scm
index 7ed21869..eefa93a5 100644
--- a/common-declarations.scm
+++ b/common-declarations.scm
@@ -1,6 +1,6 @@
 ;;;; common-declarations.scm - settings for core libraries
 ;
-; Copyright (c) 2010, The Chicken Team
+; Copyright (c) 2010, The CHICKEN Team
 ; All rights reserved.
 ;
 ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
@@ -30,11 +30,13 @@
 
 (cond-expand
  (debugbuild
-  (define (d arg1 . more)
-    (when (##sys#fudge 13)
-      (if (null? more)
-	  (pp arg1)
-	  (apply print arg1 more)))))
+  (define-syntax d
+    (syntax-rules ()
+      ((_ arg1)
+       (when (##sys#fudge 13) (pp arg1))) ; debug-mode
+      ((_ arg1 more ...)
+       (when (##sys#fudge 13)
+	 (print arg1 more ...))))))
  (else
   (declare
     (safe-globals)
Trap