[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Test your ELisp knowledge
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Test your ELisp knowledge |
Date: |
Fri, 9 Feb 2024 15:12:47 +0000 |
> Me too but is it just because their-fun comes first in text order, e.g.
> M-: (+ (/ my-x 0) (their-fun))
> gives "(void-variable my-x)"
Yes, the args to `+' are evaluated in that
order. (Similarly for all Elisp functions,
but not necessarily for macros and special
forms.)
But the error in the original case happens
because a sexp such as (their-fun ...)
could be a function call or a macro, with
an unknown/undefined `their-fun'. Can't
assume that the args need to be evaluated.
Even though Elisp evaluates all args of a
function first-thing (applicative-order
evaluation), which would check `my-x',
it first has to find out if `their-fun'
is a function.
Functions such as `+' and `/' are known
(even built-in).
- Test your ELisp knowledge, Stefan Monnier, 2024/02/08
- RE: [External] : Test your ELisp knowledge, Drew Adams, 2024/02/08
- Re: Test your ELisp knowledge, Yuri Khan, 2024/02/08
- Re: Test your ELisp knowledge, Po Lu, 2024/02/09
- Re: Test your ELisp knowledge, Manuel Giraud, 2024/02/09
- Re: Test your ELisp knowledge, Manuel Giraud, 2024/02/09
- Re: Test your ELisp knowledge, tomas, 2024/02/09