unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: append, push, and add-to-list.
@ 2021-07-05 14:37 Drew Adams
  2021-07-05 14:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 88+ messages in thread
From: Drew Adams @ 2021-07-05 14:37 UTC (permalink / raw)
  To: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'; +Cc: Emanuel Berg

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

> But with '() you see that it is (an empty) list:
> 
>   (defvar lst)
>   (setq lst '())

Yes, for human reading, () suggests that the
value might be used as a list, and nil suggests
that it might not be (e.g., it might be used as
a truth value or otherwise).

But there is no reason to quote ().  Like t,
() is evaluates to itself.

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 12379 bytes --]

^ permalink raw reply	[flat|nested] 88+ messages in thread
* append, push, and add-to-list.
@ 2021-07-04  3:18 Hongyi Zhao
  2021-07-04  4:35 ` Jean Louis
  0 siblings, 1 reply; 88+ messages in thread
From: Hongyi Zhao @ 2021-07-04  3:18 UTC (permalink / raw)
  To: help-gnu-emacs

I've noticed there are some similar functions, i.e., append, push, and
add-to-list, for revising/updating the content of a list. But I'm
still not so clear on the specific use scenarios for them. Consider
the following command [1]:

(push '(company-capf company-ispell) company-backends)

What's the equivalent representations using append and add-to-list?
Which methods are preferable?

[1] <https://github.com/company-mode/company-mode/issues/1124#issuecomment-864461337>

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



^ permalink raw reply	[flat|nested] 88+ messages in thread

end of thread, other threads:[~2021-07-21  8:55 UTC | newest]

Thread overview: 88+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-05 14:37 append, push, and add-to-list Drew Adams
2021-07-05 14:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 15:19   ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-05 16:18     ` [External] : " Drew Adams
2021-07-05 16:46     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:54       ` Jean Louis
2021-07-06 20:08         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 15:41   ` tomas
2021-07-05 16:58     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 17:21       ` tomas
2021-07-06  1:17         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:10       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:18         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:11       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:39         ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-05 20:35           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:57         ` Jean Louis
2021-07-06 20:16           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:56       ` Jean Louis
2021-07-06 20:15         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:51     ` Quote by Knuth Jean Louis
2021-07-06 20:06       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 21:57         ` Christopher Dimech
2021-07-06 22:16           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 22:26             ` Alexandre Garreau
2021-07-06 23:21               ` Christopher Dimech
2021-07-14 16:09                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 17:37                   ` Christopher Dimech
2021-07-14 17:41                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15  3:08                       ` Christopher Dimech
2021-07-18 22:25                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:18                           ` Christopher Dimech
2021-07-14 16:02               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 16:20                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 17:41                 ` Christopher Dimech
2021-07-14 17:43             ` Christopher Dimech
2021-07-14 17:49               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15  3:05                 ` Christopher Dimech
2021-07-15  6:50                   ` tomas
2021-07-15  6:55                     ` Christopher Dimech
2021-07-15  7:11                       ` tomas
2021-07-15 10:55                         ` Christopher Dimech
2021-07-18 22:23                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:22                         ` Christopher Dimech
2021-07-18 22:20                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:27                     ` Christopher Dimech
2021-07-14 19:24               ` Jean Louis
2021-07-14 20:15                 ` Christopher Dimech
2021-07-14 20:30                   ` Marcin Borkowski
2021-07-14 20:58                     ` Christopher Dimech
2021-07-14 22:54                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 21:04                     ` Christopher Dimech
2021-07-14 23:05                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 22:53                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15  6:06                       ` Marcin Borkowski
2021-07-15  6:21                         ` Christopher Dimech
2021-07-17 18:43                           ` Marcin Borkowski
2021-07-18  7:41                             ` Christopher Dimech
2021-07-18 11:50                               ` Jean Louis
2021-07-18 13:17                                 ` Christopher Dimech
2021-07-18 13:41                                   ` Jean Louis
2021-07-18 17:57                                     ` Christopher Dimech
2021-07-18 23:25                                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 16:27                                     ` Christopher Dimech
2021-07-20 16:39                                     ` Christopher Dimech
2021-07-18 22:58                                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 16:41                                   ` Christopher Dimech
2021-07-18 22:54                               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20 17:10                                 ` Christopher Dimech
2021-07-18 13:54                             ` Christopher Dimech
2021-07-18 22:37                             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-18 22:34                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 22:43                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-14 22:31                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-15  2:58                   ` Christopher Dimech
2021-07-15  6:43                     ` Eli Zaretskii
2021-07-18 22:14                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-19  7:07                       ` tomas
2021-07-19  8:05                         ` Christopher Dimech
2021-07-21  4:52                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  8:55                             ` Christopher Dimech
2021-07-21  4:28                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  8:42                           ` Gregory Heytings
2021-07-19  8:44                       ` lisa-asket
2021-07-06 21:34       ` Christopher Dimech
2021-07-05 16:19   ` [External] : Re: append, push, and add-to-list Drew Adams
2021-07-05 16:41     ` Emanuel Berg via Users list for the GNU Emacs text editor
  -- strict thread matches above, loose matches on Subject: below --
2021-07-04  3:18 Hongyi Zhao
2021-07-04  4:35 ` Jean Louis
2021-07-04  5:11   ` Hongyi Zhao
2021-07-04 11:28     ` Jean Louis
2021-07-04 13:50       ` Hongyi Zhao
2021-07-04 16:01         ` [External] : " Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).