[Metabang-bind-devel] metabang-bind/clisp breakage
Daniel Herring
dherring at tentpost.com
Fri Aug 28 05:44:51 UTC 2009
On Thu, 27 Aug 2009, Daniel Herring wrote:
> Metabang-bind used to work with clisp; but I can't get bind version 0.7.4
> to work with clisp versions 2.47 or 2.48. Bind 0.7.4 does work for me
> with current CCL, ECL, and SBCL. The offending change was apparently made
> in a significant bind rewrite on 2009-03-01 with commit message "complete
> refactoring and macroizing".
>
> This problem was found in cl-markdown with forms like
> (bind (((:struct markup- name inner outer encoding-method) markup))
> (format stream "~a : ~a ~a ~a"
> name outer inner encoding-method))
>
> Clisp fails to macroexpand this, giving messages like
> FUNCALL: undefined function #1=#:|binding-generator6558|
> [Condition of type SYSTEM::SIMPLE-UNDEFINED-FUNCTION]
...
The attached patch resolves the problem and gives some explanation of its
cause.
- Daniel
-------------- next part --------------
From 499bca0937d1a35c6e14e15a6db69769db32ca81 Mon Sep 17 00:00:00 2001
From: D Herring <dherring at at.tentpost.dot.com>
Date: Fri, 28 Aug 2009 00:17:37 -0400
Subject: [PATCH] Work around a clisp bug.
Clisp has trouble passing gensyms between forms created by a macro.
see e.g.
http://sourceforge.net/tracker/index.php?func=detail&aid=836838&group_id=1355&atid=101355
This mangling should be unique for each name/s.
---
dev/macros.lisp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dev/macros.lisp b/dev/macros.lisp
index 2dd8424..7c07315 100644
--- a/dev/macros.lisp
+++ b/dev/macros.lisp
@@ -54,7 +54,8 @@ instead
#+(or)
(gignores (gensym "ignores")))
(cond (multiple-names?
- (setf main-method-name (gensym "binding-generator"))
+ (setf main-method-name
+ (intern (format nil "~A_~A" 'bind-generate-bindings (car name/s))))
)
(t
(setf main-method-name 'bind-generate-bindings)
--
1.6.0.2
More information about the metabang-bind-devel
mailing list