all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: RE: [External] : Warn about comparing quoted lists (etc) using `eq`
Date: Wed, 14 Dec 2022 18:57:05 +0000	[thread overview]
Message-ID: <CO6PR10MB54736F845648AF1F0475919DF3E09@CO6PR10MB5473.namprd10.prod.outlook.com> (raw)
In-Reply-To: <8D624413-5A6C-46D7-A4EB-53C23F7CC4D3@gmail.com>

> I'm about to push a new byte-compiler warning that finds mistakes like
> 
>   (eq x '(ho hum))
> 
> Ie, attempts to compare, by identity, literals that may not match
> anything at all: quoted lists, strings, floats etc.

The warning could perhaps remind users of `equal'.

It's likely that in at least some cases what they
really meant was (equal x '(ho hum)).  And `equal'
takes care of all types (strings etc.).



  parent reply	other threads:[~2022-12-14 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 18:17 Warn about comparing quoted lists (etc) using `eq` Mattias Engdegård
2022-12-14 18:29 ` Eli Zaretskii
2022-12-14 20:57   ` Mattias Engdegård
2022-12-14 18:57 ` Drew Adams [this message]
2022-12-15  4:17 ` Juanma Barranquero
2022-12-15  6:34   ` Dr. Arne Babenhauserheide
2022-12-15  7:00     ` Juanma Barranquero
2022-12-15  9:36   ` Mattias Engdegård
2022-12-15 10:06     ` Juanma Barranquero
2022-12-15 10:50     ` Ihor Radchenko
2022-12-15 13:58       ` Mattias Engdegård
2022-12-15 16:13     ` [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

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

  git send-email \
    --in-reply-to=CO6PR10MB54736F845648AF1F0475919DF3E09@CO6PR10MB5473.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=mattias.engdegard@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.