[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cl-lib questions
From: |
Stefan Monnier |
Subject: |
Re: cl-lib questions |
Date: |
Wed, 21 Jul 2021 17:59:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> 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`.
Stefan
- Re: Screenshots, frame shots straight from Emacs, (continued)
- Re: Screenshots, frame shots straight from Emacs, Leo Butler, 2021/07/20
- 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 <=
- Re: cl-lib questions, Emanuel Berg, 2021/07/21
- 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