[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cl-lib questions
From: |
Emanuel Berg |
Subject: |
Re: cl-lib questions |
Date: |
Thu, 22 Jul 2021 00:09:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier via Users list for the GNU Emacs text editor wrote:
>> Can you perhaps say a couple of words on the intended use
>> for `setf', I get it it is a generic function (macro) but
>> is there in your mind say one or two typical use cases or
>> something like that to exemplify?
>
> A typical example for me is when you want to modify the field of
> a struct:
>
> (cl-defstruct my-foo a b c)
>
> then you can set the field `b` of a my-foo struct X to value V with:
>
> (setf (my-foo-b X) V)
>
> I also like to (ab)use it for things like
>
> (push (make-new-element)
> (if (something)
> x
> y))
>
>> Also, what is the difference between setf and `setq' with
>> respect to setting `let'/`let*' variables?
>
> None.
>
>> Another cl-lib question is the type of clause usable with
>> `cl-loop' that are described like this in the docstring:
>
> I wouldn't know, I never use `cl-loop`.
OK, thanks!
--
underground experts united
https://dataswamp.org/~incal
- Re: Screenshots, frame shots straight from Emacs, (continued)
- Re: Screenshots, frame shots straight from Emacs, Tomas Hlavaty, 2021/07/20
- Re: Screenshots, frame shots straight from Emacs, Tomas Hlavaty, 2021/07/31
- Re: Screenshots, frame shots straight from Emacs, Emanuel Berg, 2021/07/31
- Re: Screenshots, frame shots straight from Emacs, Eduardo Ochs, 2021/07/31
- Re: Screenshots, frame shots straight from Emacs, Stefan Monnier, 2021/07/20
- Re: Screenshots, frame shots straight from Emacs, Stefan Monnier, 2021/07/20
- Re: Screenshots, frame shots straight from Emacs, Leo Butler, 2021/07/21
- Re: Screenshots, frame shots straight from Emacs, Stefan Monnier, 2021/07/21
- cl-lib questions (was: Re: Screenshots, frame shots straight from Emacs), Emanuel Berg, 2021/07/21
- Re: cl-lib questions, Stefan Monnier, 2021/07/21
- Re: cl-lib questions,
Emanuel Berg <=
- Re: Screenshots, frame shots straight from Emacs, Tomas Hlavaty, 2021/07/22
- Re: Screenshots, frame shots straight from Emacs, Stefan Monnier, 2021/07/22
- Re: Screenshots, frame shots straight from Emacs, Emanuel Berg, 2021/07/22
- Re: Screenshots, frame shots straight from Emacs, Jean Louis, 2021/07/23
- Re: Screenshots, frame shots straight from Emacs, Emanuel Berg, 2021/07/31
- Re: Screenshots, frame shots straight from Emacs, Tomas Hlavaty, 2021/07/31
- Re: Screenshots, frame shots straight from Emacs, Emanuel Berg, 2021/07/22
- Re: Screenshots, frame shots straight from Emacs, Tomas Hlavaty, 2021/07/31
Re: Screenshots, frame shots straight from Emacs, Emanuel Berg, 2021/07/20