[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to tame compiler?
From: |
Emanuel Berg |
Subject: |
Re: How to tame compiler? |
Date: |
Sat, 01 May 2021 00:56:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier wrote:
>>> 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.
Okay, no, we are using `eval' and it works. If someone says we
shouldn't do it we say we do it because of the format of
`command-history'. If they say anything more after that
I don't feel we have to say anything.
--
underground experts united
https://dataswamp.org/~incal
- Org mode rant, (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, 2021/04/30
- Re: How to tame compiler?,
Emanuel Berg <=
Re: How to tame compiler?, Michael Heerdegen, 2021/04/30