[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: append, push, and add-to-list.
From: |
Drew Adams |
Subject: |
RE: [External] : Re: append, push, and add-to-list. |
Date: |
Sun, 4 Jul 2021 16:01:15 +0000 |
> I'm curious why `add-to-list' must take 'company-backends, i.e.,
> (quote company-backends) as one of its argument, while the other
> functions can directly use the unquoted form.
It's not that it "must take" a quoted symbol as arg.
It's that takes a symbol as arg. That symbol can be
provided any way you like, i.e., by evaluating any
sexp that results in a symbol.
It's essentially equivalent to using both a `pushnew'
and a `set' or `setq' (with a variable as PLACE). It
sets the variable value of its symbol arg to the new
list value.
As others have said, you will do yourself a favor by
reading (even studying) the Elisp manual.
Likewise, by looking at the Elisp source code provided
with Emacs. The source code is freely available;
consider taking advantage of that fact.
`grep' the source code and use `flush-lines' to remove
instances where the first arg to `add-to-list' is a
quoted symbol, to get a feel for its use evaluating a
sexp (other than a quoted symbol) that yields a symbol.
- append, push, and add-to-list., Hongyi Zhao, 2021/07/03
- Re: append, push, and add-to-list., Jean Louis, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- Re: append, push, and add-to-list., Jean Louis, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- Re: append, push, and add-to-list., Jean Louis, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- RE: [External] : Re: append, push, and add-to-list.,
Drew Adams <=
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/04
Re: append, push, and add-to-list., Emanuel Berg, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/04
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/05
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/05
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/05
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/05
Re: append, push, and add-to-list., Jean Louis, 2021/07/05
Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/05