[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to tame compiler?
From: |
Stefan Monnier |
Subject: |
Re: How to tame compiler? |
Date: |
Fri, 30 Apr 2021 18:50:36 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> Here, as in your other example, you have to use `eval`,
>> because `command-history` was defined to contain a list of
>> ELisp expressions and those can't be used other than via
>> `eval`.
>>
>> So I'll grant you a pass for this time.
>>
>> If you were in a position to control the format of history
>> variable, then you wouldn't have to use `eval` here, OTOH:
>> you could define that variable to hold a list of *functions*
>> and you'd just use `funcall` instead of `eval`.
>
> OK, clear...
Of course, you can't "search" for functions the way you do with the
`cl-find-if`, and functions can't be printed in a user-friendly way, so
there's a good reason for `command-history` not to contain
just functions.
So if you wanted to replace it with a history that can be used without
`eval`, you'd probably make the new variable contain a list where every
element is of the form (FUNCTION . ARGS), so that you'd replace `eval`
with `apply`, and you'd recommend that the FUNCTION be a symbol rather
than an anonymous function, to be sure that it can be compared and
printed in a useful way.
Stefan
- Re: rcd-template-eval, much is in Org mode, (continued)
- eval myths - Re: How to tame compiler?, Jean Louis, 2021/04/30
- Re: eval myths - Re: How to tame compiler?, Emanuel Berg, 2021/04/30
- Re: eval myths - Re: How to tame compiler?, Jean Louis, 2021/04/30
- Re: eval myths - Re: How to tame compiler?, Emanuel Berg, 2021/04/30
- Re: How to tame compiler?, Emanuel Berg, 2021/04/30
- Re: How to tame compiler?, Stefan Monnier, 2021/04/30
- Re: How to tame compiler?, Emanuel Berg, 2021/04/30
- Re: How to tame compiler?,
Stefan Monnier <=
- Re: How to tame compiler?, Emanuel Berg, 2021/04/30
Re: How to tame compiler?, Michael Heerdegen, 2021/04/30