with-unique-names: simplify extension and fix typo

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
This commit is contained in:
Daniel Kochmański 2015-07-01 16:10:22 +02:00
parent 12e402b2f0
commit dc6aa0bce0

View file

@ -136,13 +136,7 @@
(defmacro with-unique-names (symbols &body body)
`(let* ,(mapcar (lambda (symbol)
(let* ((symbol-name (symbol-name symbol))
#+ecl-min
(stem symbol-name)
#-ecl-min
(stem (if (every #'alpha-char-p symbol-name)
nil
symbol-name
(concatenate 'string symbol-name "-"))))
(stem symbol-name))
`(,symbol (gensym ,stem))))
symbols)
,@body))