unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: [External] : Re: append, push, and add-to-list.
Date: Mon, 05 Jul 2021 18:41:04 +0200	[thread overview]
Message-ID: <87fswsg1cv.fsf@zoho.eu> (raw)
In-Reply-To: SA2PR10MB44746D6FC8F09503488452CAF31C9@SA2PR10MB4474.namprd10.prod.outlook.com

Drew Adams wrote:

> To each their own. ;-) I don't find '() easier to spot than
> ().

It is easier to spot because it has an additional apostrophe
(or apostrophe-quote) compared to (), that makes it more
visibly and makes it stick out compared to all the (( and ))
of `let', `cond', and more, and in general, from all the
parenthesis of Lisp.

>> But ... ultimately one writes code so the computer can
>> execute it, and not so that a human can read it. So maybe
>> one shouldn't quote empty lists?
>> 
>> If so, I have 14 corrections to make...
>
> No, the computer couldn't care less whether
> you write (list), nil, (), or '(). ;-)

... but you yourself said `list' is a function, nil is
a constant (hm... didn't know we had those -

(defun c-constant-symbol (sym len)
  "Create an uneditable symbol for customization buffers.
SYM is the name of the symbol, LEN the length of the field (in
characters) the symbol will be displayed in.  LEN must be big
enough.

This returns a (const ....) structure, suitable for embedding
within a customization type."
  (or (symbolp sym) (error "c-constant-symbol: %s is not a symbol" sym))
  (let* ((name (symbol-name sym))
	 (l (length name))
	 (disp (concat name ":" (make-string (- len l 1) ?\ ))))
    `(const
      :size ,len
      :format ,disp
      :value ,sym))))

- perhaps that's something else since it seems to be just
a list where the first element is const - but here, nil is
unsuited for other reasons - and () is a constant (another,
here more suited syntax, for nil), and '() is another syntax
for (quote ()), which is `quote' a special form?

Maybe the "special form" thing is that it doesn't eval
the argument?

  (setf (quote ...) ...)

Both list and quote are built-in, IOW written in C?

-- 
underground experts united
https://dataswamp.org/~incal




  reply	other threads:[~2021-07-05 16:41 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fswsg1cv.fsf@zoho.eu \
    --to=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).