Created
December 1, 2010 11:32
-
-
Save southly/723371 to your computer and use it in GitHub Desktop.
fix macroexpand. #xyzzy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/eval.cc b/src/eval.cc | |
index 6d5d1d3..9203741 100644 | |
--- a/src/eval.cc | |
+++ b/src/eval.cc | |
@@ -1523,10 +1523,15 @@ lisp | |
Fmacroexpand (lisp arg, lisp env) | |
{ | |
protect_gc gcpro (arg); | |
- do | |
- arg = Fmacroexpand_1 (arg, env); | |
- while (multiple_value::value (1) != Qnil); | |
- multiple_value::clear (); | |
+ int n = 0; | |
+ while (1) | |
+ { | |
+ arg = Fmacroexpand_1 (arg, env); | |
+ if (multiple_value::value (1) == Qnil) break; | |
+ n++; | |
+ } | |
+ multiple_value::count () = 2; | |
+ multiple_value::value (1) = n > 0 ? Qt : Qnil; | |
return arg; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment