diff options
author | Paul M. Rodriguez <pmr@ruricolist.com> | 2017-10-19 16:55:35 -0500 |
---|---|---|
committer | Paul M. Rodriguez <pmr@ruricolist.com> | 2017-10-19 17:01:57 -0500 |
commit | 96e4bb947d054f9d18b89b7c1235f3c00696def3 (patch) | |
tree | 136f9e9ede3205a9a98c7880f4daf6f6ff3a32f0 | |
parent | 944a2aa11b73092626878fa862ada10349c473d3 (diff) |
Return a third value.
If the env is ignored, the third value is nil.
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | trivial-macroexpand-all.lisp | 26 |
2 files changed, 17 insertions, 15 deletions
@@ -4,13 +4,15 @@ Provides a macroexpand-all function that calls the implementation specific equiv Supports: `abcl`, `allegro`, `ccl`, `clisp`, `cmucl`, `corman`, `lispworks`, `mkcl`, `sbcl`, `ecl` & `scl` -If you the function from a supported implementation then the two return values are: +If you the function from a supported implementation then the three return values are: - the expanded form - t +- t, if the implementation specific equivalent accepts an environment -If you the function from an usupported implementation then the two return values are: +If you the function from an usupported implementation then the three return values are: - the original form - nil +- nil ## Example diff --git a/trivial-macroexpand-all.lisp b/trivial-macroexpand-all.lisp index 9d5a2bc..f548648 100644 --- a/trivial-macroexpand-all.lisp +++ b/trivial-macroexpand-all.lisp @@ -2,58 +2,58 @@ #+abcl (defun macroexpand-all (form &optional env) - (values (ext:macroexpand-all form env) t)) + (values (ext:macroexpand-all form env) t t)) #+allegro (defun macroexpand-all (form &optional env) (declare (ignore env)) #+(and allegro-version>= (version>= 8 0)) - (values (excl::walk-form form) t) + (values (excl::walk-form form) t nil) #-(and allegro-version>= (version>= 8 0)) - (values (excl::walk form) t)) + (values (excl::walk form) t nil)) #+ccl (defun macroexpand-all (form &optional env) - (values (ccl:macroexpand-all form env) t)) + (values (ccl:macroexpand-all form env) t t)) #+clisp (defun macroexpand-all (form &optional env) (declare (ignore env)) - (values (ext:expand-form form) t)) + (values (ext:expand-form form) t nil)) #+cmucl (defun macroexpand-all (form &optional env) - (values (walker:macroexpand-all form env) t)) + (values (walker:macroexpand-all form env) t t)) #+corman (defun macroexpand-all (form &optional env) (declare (ignore env)) - (values (ccl:macroexpand-all form) t)) + (values (ccl:macroexpand-all form) t nil)) #+ecl (defun macroexpand-all (form &optional env) - (values (walker:macroexpand-all form env) t)) + (values (walker:macroexpand-all form env) t t)) #+lispworks (defun macroexpand-all (form &optional env) (declare (ignore env)) - (values (walker:walk-form form) t)) + (values (walker:walk-form form) t nil)) #+mkcl (defun macroexpand-all (form &optional env) (declare (ignore env)) - (values (walker:macroexpand-all form) t)) + (values (walker:macroexpand-all form) t nil)) #+sbcl (defun macroexpand-all (form &optional env) - (values (sb-cltl2:macroexpand-all form env) t)) + (values (sb-cltl2:macroexpand-all form env) t t)) #+scl (defun macroexpand-all (form &optional env) (declare (ignore env)) - (values (macroexpand form) t)) + (values (macroexpand form) t nil)) #-(or abcl allegro ccl clisp cmucl corman ecl lispworks mkcl sbcl scl) (defun macroexpand-all (form &optional env) (declare (ignore env)) - (values form nil)) + (values form nil nil)) |