From fcc596326d85a813f98e5e97a6fc8353e28a0915 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Paradis Date: Fri, 6 Oct 2023 15:30:00 -0400 Subject: [PATCH] Update to my modern standards. --- docs/index.html | 120 ++++++++++++++++++++++++++++++++---- macro-level.asd | 9 ++- tests/macro-level_tests.asd | 7 +-- 3 files changed, 115 insertions(+), 21 deletions(-) diff --git a/docs/index.html b/docs/index.html index a19ed4d..71ae79f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,9 +12,11 @@ macro-level | Libraries | HexstreamSoft + + @@ -22,6 +24,7 @@ + @@ -49,7 +52,7 @@ -

This page was last updated on .

+

This page was last updated on .

@@ -119,23 +122,116 @@

macro-level

-
+ + +
+ +

+ + + + + Overview + +

When used as part of a macroexpansion, macro-level also conveniently relieves the macro implementor from naming and using a gensym for the one-shot macro when compared to writing out a macrolet by hand, in addition to the other advantages.

-

To use macro-level, simply (macro-level:macro-level ...) after loading the ASDF system, as this macro is not used that often and the length won't have any effect on the indentation:

+
-
-
(macro-level:macro-level
-  ...)
-;; VS
-(macro-level
-  ...)
-
+
+ +

+ + + + + Dictionary + +

+ + + +
-

Simply (:import-from #:macro-level #:macro-level) in your defpackage if you prefer the latter form. Don't (:use)!

+

+ + + + + Dictionary + » macro-level + +

+ +
+ +

Package macro-level

+ +
+

Description

+

Simply (:import-from #:macro-level #:macro-level) from your defpackage. Don't (:use)!

+
+ +
+ +
+ +

Macro macro-level

+ +

&body body => results

+ +
+

Arguments and Values

+ +
+ +
+

Description

+

Expands to `(macrolet ((,macro () ,@body)) (,macro)) where macro is a gensym.

+
+ +
+ +
+ + + +
+ +
+ +

+ + + + + Future work + +

-

Support could eventually be added to Slime so that interactive macroexpansion of macro-level calls with C-c C-m (slime-expand-1) would show the same expansion as interactively macroexpanding (m ...) after (defmacro m () ...), assuming the lexical context is not important.

+

Support could eventually be added to Slime so that interactive macroexpansion of macro-level calls with C-c C-m (slime-expand-1)
would show the same expansion as interactively macroexpanding (m ...) after (defmacro m () ...), assuming the lexical context is not important.

diff --git a/macro-level.asd b/macro-level.asd index e1fcddb..57581d2 100644 --- a/macro-level.asd +++ b/macro-level.asd @@ -1,15 +1,14 @@ (asdf:defsystem #:macro-level - :author "Jean-Philippe Paradis " + :author "Jean-Philippe Paradis " - ;; See the UNLICENSE file for details. - :license "Public Domain" + :license "Unlicense" - :description "MACRO-LEVEL is an embarassingly trivial convenience macro that saves on indentation while being more concise and direct. (macro-level ...) == (macrolet ((m () ...)) (m))" + :description "An embarassingly trivial convenience macro that saves on indentation while being more concise and direct. (macro-level ...) == (macrolet ((m () ...)) (m))" :depends-on () - :version "1.0.1" + :version "1.1" :serial cl:t :components ((:file "package") (:file "main")) diff --git a/tests/macro-level_tests.asd b/tests/macro-level_tests.asd index 12c9976..11a7a10 100644 --- a/tests/macro-level_tests.asd +++ b/tests/macro-level_tests.asd @@ -1,11 +1,10 @@ (asdf:defsystem #:macro-level_tests - :author "Jean-Philippe Paradis " + :author "Jean-Philippe Paradis " - ;; See the UNLICENSE file for details. - :license "Public Domain" + :license "Unlicense" - :description "MACRO-LEVEL unit tests." + :description "macro-level unit tests." :depends-on ("macro-level" "parachute")