fix (unwalk-form (walk-form :foo)) being walked into a constant-form
Fri Jul 17 10:36:02 PDT 2009 attila.lendvai@gmail.com
* fix (unwalk-form (walk-form :foo)) being walked into a constant-form
Warning: CRC errors found. These are probably harmless but should be repaired.
See 'darcs gzcrcs --help' for more information.
diff -rN -u old-cl-walker/src/functions.lisp new-cl-walker/src/functions.lisp
--- old-cl-walker/src/functions.lisp 2014-07-27 21:16:49.000000000 -0700
+++ new-cl-walker/src/functions.lisp 2014-07-27 21:16:49.000000000 -0700
@@ -243,8 +243,9 @@
(setf (default-value-of arg) (walk-form default-value arg env))))))
(defunwalker-handler optional-function-argument-form (name supplied-p-parameter)
- (let ((default-value (unwalk-form (default-value-of -form-))))
- (cond ((and name default-value supplied-p-parameter)
+ (let ((default-value (awhen (default-value-of -form-)
+ (unwalk-form it))))
+ (cond ((and name supplied-p-parameter)
`(,name ,default-value ,supplied-p-parameter))
((and name default-value)
`(,name ,default-value))
@@ -277,10 +278,11 @@
(setf (default-value-of arg) (walk-form default-value arg env)))))))
(defunwalker-handler keyword-function-argument-form (keyword-name name default-value supplied-p-parameter)
- (let ((default-value (unwalk-form (default-value-of -form-))))
- (cond ((and keyword-name name default-value supplied-p-parameter)
+ (let ((default-value (awhen (default-value-of -form-)
+ (unwalk-form it))))
+ (cond ((and keyword-name name supplied-p-parameter)
`((,keyword-name ,name) ,default-value ,supplied-p-parameter))
- ((and name default-value supplied-p-parameter)
+ ((and name supplied-p-parameter)
`(,name ,default-value ,supplied-p-parameter))
((and name default-value)
`(,name ,default-value))
diff -rN -u old-cl-walker/src/handlers.lisp new-cl-walker/src/handlers.lisp
--- old-cl-walker/src/handlers.lisp 2014-07-27 21:16:49.000000000 -0700
+++ new-cl-walker/src/handlers.lisp 2014-07-27 21:16:49.000000000 -0700
@@ -13,7 +13,8 @@
(defunwalker-handler constant-form (value)
(if (or (eq value t)
- (eq value nil))
+ (eq value nil)
+ (keywordp value))
value
(typecase value
(symbol `(quote ,value))
diff -rN -u old-cl-walker/src/infrastructure.lisp new-cl-walker/src/infrastructure.lisp
--- old-cl-walker/src/infrastructure.lisp 2014-07-27 21:16:49.000000000 -0700
+++ new-cl-walker/src/infrastructure.lisp 2014-07-27 21:16:49.000000000 -0700
@@ -149,6 +149,7 @@
(declare (ignore env))
(or (eq form t)
(eq form nil)
+ (keywordp form)
(not (or (symbolp form)
(consp form)))))