From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mekeor Melire Newsgroups: gmane.emacs.bugs Subject: bug#71503: 30.0.50; pcase-lambda (with "and" and "guard") does not work as expected Date: Sun, 21 Jul 2024 13:33:18 +0000 Message-ID: <87o76qswdd.fsf@posteo.de> References: <87r0d2lfjd.fsf@posteo.de> <87h6dvud8u.fsf@posteo.net> <86tthlidap.fsf@gnu.org> <86frsn55t3.fsf@gnu.org> <865xt0e6wc.fsf@gnu.org> <87ikx0mk4c.fsf@posteo.net> <86r0bocpd6.fsf@gnu.org> <87zfqbkn9q.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17858"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , Eli Zaretskii , monnier@iro.umontreal.ca To: 71503@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 21 15:34:13 2024 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 1sVWhZ-0004R1-5P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jul 2024 15:34:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVWhN-0008Rh-Id; Sun, 21 Jul 2024 09:34:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVWhM-0008RY-Jf for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2024 09:34:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVWhM-0002Hk-BW for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2024 09:34:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sVWhN-0005SU-Rw for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2024 09:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jul 2024 13:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71503 X-GNU-PR-Package: emacs Original-Received: via spool by 71503-submit@debbugs.gnu.org id=B71503.172156881620949 (code B ref 71503); Sun, 21 Jul 2024 13:34:01 +0000 Original-Received: (at 71503) by debbugs.gnu.org; 21 Jul 2024 13:33:36 +0000 Original-Received: from localhost ([127.0.0.1]:54903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVWgx-0005Ro-Bu for submit@debbugs.gnu.org; Sun, 21 Jul 2024 09:33:35 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:44597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVWgu-0005Ra-AE for 71503@debbugs.gnu.org; Sun, 21 Jul 2024 09:33:33 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 89527240029 for <71503@debbugs.gnu.org>; Sun, 21 Jul 2024 15:33:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1721568803; bh=fEAcSGKyK63MK5tpKMGLBn6FBkz/rMI9bByoPHUTWug=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=kwro8M8tVci+97v6fr7wc+6ISj3NRsuAurr+GleQbnEBCbqpuPjRWtBZySsNQWzXD Om+nAZud6TG+jGYDAkF831QaV+kOwWwLB8T2RPfrx1HKvf3OGDXi5bG9JaJvCetg7d 0KQHtSiYnoxljafkQxCAIL67MOnPj3DhA/gyBedMZH6TGxTNhJ755pDlw4zHh8SVtV YEnfNY3Q1G+JQjzY5hCUJ/FDZmMUPMRwP4vo8guKKzxCY+lFrLoRWHkDvYMwtL6VG5 1PGqUccCHIx5ovEK+82YIo1rIEk+tdRwbMEDA1vtXuaLHKEUGouDUBY7lJKouCEhD/ WCGFbIcNOk9Dg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WRkrL2ms7z9rxB; Sun, 21 Jul 2024 15:33:22 +0200 (CEST) In-Reply-To: <87zfqbkn9q.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 21 Jul 2024 11:17:05 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289072 Archived-At: 2024-07-21 11:17 philipk@posteo.net: > What do you think of: > "Like `lambda' but allow each argument to be a pattern. > -I.e. accepts the usual &optional and &rest keywords, but every > -formal argument can be any pattern accepted by `pcase' (a mere > -variable name being but a special case of it)." > +I.e. accepts the usual &optional and &rest keywords, but every formal > +argument can be any pattern destructed by `pcase-let' (a mere variable > +name being but a special case of it). > + > +Each argument should match its respective pattern in the parameter > +list (i.e. be of a compatible structure); a mismatch may signal an error > +or may go undetected, binding arguments to arbitrary values, such as > +nil." > (declare (doc-string 2) (indent defun) > (debug (&define (&rest pcase-PAT) lambda-doc def-body))) > (let* ((bindings ()) Being the submitter of this bug-report, this suggested change would indeed fix the problem for me and would avoid confusion. I thus support this change and thank y'all for your efforts.