From e8fbeb9bc62f78efd8a5fe6bd044be32a8b84c88 Mon Sep 17 00:00:00 2001 From: Lovro Lugovic <lovrolu@hotmail.com> Date: Mon, 20 May 2019 00:51:33 +0200 Subject: [PATCH] Improve WITH-GENSYMS docstring --- macros.lisp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/macros.lisp b/macros.lisp index f06dc84..e00618c 100644 --- a/macros.lisp +++ b/macros.lisp @@ -1,17 +1,14 @@ (in-package :alexandria) (defmacro with-gensyms (names &body forms) - "Binds each variable named by a symbol in NAMES to a unique symbol around -FORMS. Each of NAMES must either be either a symbol, or of the form: + "Binds a set of variables to gensyms and evaluates the implicit progn FORMS. - (symbol string-designator) +Each element within NAMES is either a symbol SYMBOL or a pair (SYMBOL +STRING-DESIGNATOR). Bare symbols are equivalent to the pair (SYMBOL SYMBOL). -Bare symbols appearing in NAMES are equivalent to: - - (symbol symbol) - -The string-designator is used as the argument to GENSYM when constructing the -unique symbol the named variable will be bound to." +Each pair (SYMBOL STRING-DESIGNATOR) specifies that the variable named by SYMBOL +should be bound to a symbol constructed using GENSYM with the string designated +by STRING-DESIGNATOR being its first argument." `(let ,(mapcar (lambda (name) (multiple-value-bind (symbol string) (etypecase name -- GitLab