Created
November 26, 2010 11:34
-
-
Save southly/716591 to your computer and use it in GitHub Desktop.
fix flet, labels, macrolet. #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/cons.h b/src/cons.h | |
index 82961bd..aeb9c86 100644 | |
--- a/src/cons.h | |
+++ b/src/cons.h | |
@@ -10,6 +10,7 @@ public: | |
}; | |
# define consp(X) typep ((X), Tcons) | |
+# define listp(X) ((X) == Qnil || consp (X)) | |
inline void | |
check_cons (lisp x) | |
diff --git a/src/eval.cc b/src/eval.cc | |
index 2cc5fb4..6d5d1d3 100644 | |
--- a/src/eval.cc | |
+++ b/src/eval.cc | |
@@ -1295,7 +1295,7 @@ Fsi_set_function_name (lisp closure, lisp name) | |
static lisp | |
flet (lisp arg, lex_env &olex, lex_env &nlex, int macrop) | |
{ | |
- if (!consp (arg) || !consp (xcar (arg)) || !consp (xcdr (arg))) | |
+ if (!consp (arg) || !listp (xcar (arg)) || !listp (xcdr (arg))) | |
FEtoo_few_arguments (); | |
lisp ofns = nlex.lex_fns; | |
for (lisp defs = xcar (arg); consp (defs); defs = xcdr (defs)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment