summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaggers <chris.bagley@gmail.com>2017-10-20 15:38:02 +0200
committerGitHub <noreply@github.com>2017-10-20 15:38:02 +0200
commit933270ac7107477de1bc92c1fd641fe646a7a8a9 (patch)
tree136f9e9ede3205a9a98c7880f4daf6f6ff3a32f0
parent944a2aa11b73092626878fa862ada10349c473d3 (diff)
parent96e4bb947d054f9d18b89b7c1235f3c00696def3 (diff)
Merge pull request #3 from TBRSS/master
Return a third value.
-rw-r--r--README.md6
-rw-r--r--trivial-macroexpand-all.lisp26
2 files changed, 17 insertions, 15 deletions
diff --git a/README.md b/README.md
index 94359ce..cb0d2f8 100644
--- a/README.md
+++ b/README.md
@@ -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))