From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57915: 29.0.50; Misleading warning about use of quote in clause of cl-case Date: Mon, 19 Sep 2022 13:38:34 +0200 Message-ID: References: <87y1ugo4qk.fsf@bernoul.li> <87pmfrwyri.fsf@gnus.org> Reply-To: Philipp Stephani Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19839"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jonas Bernoulli , 57915@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 13:42:00 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oaF9z-0004wi-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 13:41:59 +0200 Original-Received: from localhost ([::1]:45664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaF9y-0005Rh-7Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 07:41:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaF79-0005QC-7a for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 07:39:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaF78-0002ox-V7 for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 07:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaF77-0003bE-Pu for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 07:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 11:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57915-submit@debbugs.gnu.org id=B57915.166358753613820 (code B ref 57915); Mon, 19 Sep 2022 11:39:01 +0000 Original-Received: (at 57915) by debbugs.gnu.org; 19 Sep 2022 11:38:56 +0000 Original-Received: from localhost ([127.0.0.1]:52576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaF71-0003ap-Hs for submit@debbugs.gnu.org; Mon, 19 Sep 2022 07:38:55 -0400 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:45998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaF6y-0003ab-Tr for 57915@debbugs.gnu.org; Mon, 19 Sep 2022 07:38:53 -0400 Original-Received: by mail-lj1-f175.google.com with SMTP id c7so22102174ljm.12 for <57915@debbugs.gnu.org>; Mon, 19 Sep 2022 04:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=SAh06Z57qJc0JfDSckDh3lHh1/KeUPE+7cXlvCWmafE=; b=qpReR/Cs1LaRCXEgP/vNpypSiTAfsKD0S9MfRsKJuTLl9xkpTDa1+UjOnhWdSK2kf1 2Yod1OljhjL/08h9WeUa7ebuLMQmP0Wz/EyYTSPYuw+mX39kGit2fqNC6RSdvDlzXDXt sgLM19etlJJZsaq2ZrMbMQG9rPibn0oMB3rpFWxRoxTnLkeGMkcI3CGnuarFSRhhXm+h 02BOZxu2PHm/OyTLxsBFb8cAVqZRMCGbCOvm8bKYbB2ISNAJogStAPerbpGC7Lrhbbof irALp3P0tYqupuTa+SPYnv6e9orXSLlDvyoVHDMM/+C+zI/XCW7p7OXKhp8f358kAp5M bkLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=SAh06Z57qJc0JfDSckDh3lHh1/KeUPE+7cXlvCWmafE=; b=VjR1jnzzcEvmVIadU4jfLTlyq1ObQH/VIivID3txPaQtp54oRqpRGdSsjeEOw/RPS+ PsqNJHXdWC2vx2Tk3yHgyDBVFsLz4mwkta84LtVq538EVwpK1f0zeMlxbolJhl4YMrO8 yIrF2rW22TSENoXyiBcVw4f4jhpVd0AVLzw7fZJKNsDE9fySD2/Rtly32cv7kpgof3J5 AijAQzCDn4GCKCsC5eULMC0q3bDY7Ul/swIkild6lcsRH/CPMLaLo8r+Uu65uG3ID9t1 AxOkxgK8eh2qASp0iGOzbhjVWB5ha95saVpT3xMiHuKuBiy3QVAG9VaxVlOQjuj1x4pr L+mQ== X-Gm-Message-State: ACrzQf0fLIN5J1Pw5yocfCY+M5whsoSSdfd24PC6hCWrpLQqJOo6f9H5 SgwAWz0OnRbdeCU9d6jk7KBhGZN8jpCkpNXAI8XzHA== X-Google-Smtp-Source: AMsMyM5PrruoQKRu7x+KQnzbXYASf1sO4oVo/pNbCO/dYp1bWh+1f0CGfjx+PTg439zIVx+4oBoZ+6nUok3eHaKdmpk= X-Received: by 2002:a2e:944a:0:b0:24f:10bd:b7e8 with SMTP id o10-20020a2e944a000000b0024f10bdb7e8mr5418866ljh.238.1663587526708; Mon, 19 Sep 2022 04:38:46 -0700 (PDT) In-Reply-To: <87pmfrwyri.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243069 Archived-At: On Mon, 19 Sept 2022 at 10:32, Lars Ingebrigtsen wrote: > > Jonas Bernoulli writes: > > > I inherited some code like this: > > > > (cl-case foo > > ((quote) ...) > > ((funcall) ...)) > > > > While I probably would not have written it like this, I think it > > makes sense, since (quote ...) looks like ... is being quoted. Using > > ((quote) ...) make it clear to the human reader that that is not what i= s > > happening. Unfortunately the byte-compiler now provides this misleadin= g > > warning: > > > > Warning: Case (quote) will match =E2=80=98quote=E2=80=99. If that=E2= =80=99s intended, > > write (nil quote) instead. Otherwise, don=E2=80=99t quote =E2=80= =98nil=E2=80=99. > > [...] > > > Could this special case, (quote), be handled differently? I understand > > we want to catch, pcase-inspired clauses like 'x. I am not sure we can > > tell the difference between (quote), (quote nil) and 'nil, but it seems > > to me, that if that is not the case, we should avoid the invalid > > recommendation at the cost of not warning about the other, likely > > unintended uses. > > Yeah, since there isn't really any other way to express this (or is > there?), we should probably not warn about this construction. > > I've added Philipp to the CCs; perhaps he has some comments. Makes sense, fixed in commit a71de4b52d3de14349ded7d88c4cae6e2a9376ae. --=20 Google Germany GmbH Erika-Mann-Stra=C3=9Fe 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4lschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, l=C3=B6schen Sie alle Kopien und Anh=C3=A4nge davon und lassen Sie = mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don=E2=80=99t forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.