[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defining functions on the fly
From: |
Tassilo Horn |
Subject: |
Re: Defining functions on the fly |
Date: |
Mon, 15 Jun 2015 13:24:29 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
>> > Debugger entered--Lisp error: (wrong-type-argument symbolp (intern
>> > (concat pfxd
>> > "-foo")))
>> > defalias((intern (concat pfxd "-foo")) (lambda nil nil))
>>
>> This might depend on emacs version. At least with the current git
>> version, `defalias' evaluates its first argument:
>>
>> (defalias (intern "foo-bar") #'forward-sexp) ;; Works fine
>
> In the example above, in the expansion of the `defun' call the first
> argument to defalias is the (unevaluated!) list:
>
> (intern (concat pfxd "-foo"))
>
> The corresponding call to defalias will also fail on trunk.
Ah, yes, so that's basically as if
(defalias '(intern (concat pfxd "-foo")) ...)
had been written.
Bye,
Tassilo
- Defining functions on the fly, Andreas Röhler, 2015/06/15
- Re: Defining functions on the fly, Dmitry Gutov, 2015/06/15
- Re: Defining functions on the fly, Alexis, 2015/06/15
- Re: Defining functions on the fly, Andreas Röhler, 2015/06/15
- Re: Defining functions on the fly, Alexis, 2015/06/15
- Re: Defining functions on the fly, Michael Heerdegen, 2015/06/15
- Re: Defining functions on the fly, Tassilo Horn, 2015/06/15
- Re: Defining functions on the fly, Alexis, 2015/06/15
- Re: Defining functions on the fly, Michael Heerdegen, 2015/06/15
- Re: Defining functions on the fly,
Tassilo Horn <=
- Re: Defining functions on the fly, Michael Heerdegen, 2015/06/15
Re: Defining functions on the fly, Tassilo Horn, 2015/06/15
Message not available
- Re: Defining functions on the fly, Stefan Monnier, 2015/06/15
- Re: Defining functions on the fly, Andreas Röhler, 2015/06/16
- Re: Defining functions on the fly, Tassilo Horn, 2015/06/16
- Re: Defining functions on the fly, Andreas Röhler, 2015/06/16
- Re: Defining functions on the fly, Tassilo Horn, 2015/06/16
- Re: Defining functions on the fly, Andreas Röhler, 2015/06/16
- Re: Defining functions on the fly, Tassilo Horn, 2015/06/16