[EMAIL PROTECTED] writes:
> Thanks everyone.
>
> Sorry I'm little verbose, but I can only read english.
>
> What I want?
>
> --------------------------
> COMMON-LISP-USER> (defmacro smthing (x)
> (let ((s (intern (concatenate 'string "print-" x))))
> `(defun ,s NIL (print "foo"))))
> SMTHING
>
> COMMON-LISP-USER> (macroexpand-1 '(smthing "foo"))
> (DEFUN |print-foo| () (PRINT "foo"))
> T
>
> COMMON-LISP-USER> (smthing "foo")
> |print-foo|
>
> COMMON-LISP-USER> (|print-foo|)
> "foo"
> --------------------------
>
> I'll be happy with `print-foo' function, not `|print-foo|'.
Common Lisp symbols are up-cased by the reader before they're
interned, and down-cased when printed. I'd love to explain why, but I
don't have the lambda-nature, so I'll just suggest:
(intern (concatenate 'string "PRINT-" (string-upcase x)))
instead.
HTH,
cbb
--
20:05:59 up 3 days, 2:48, 0 users, load average: 0.57, 0.33, 0.12