help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining functions on the fly


From: Michael Heerdegen
Subject: Re: Defining functions on the fly
Date: Mon, 15 Jun 2015 12:41:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:


> Seems (intern... is not evaluated at this point:
>
> (defvar pfxd "pfxd-")
>
> (defun (intern (concat pfxd "-foo")) ())
>
> -->
>
> Debugger entered--Lisp error: (wrong-type-argument symbolp (intern

That's expected.  You need to use `defalias' if you want to specify the
function name at run time.  Or use a macro.

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]