From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Installing cond* in core Date: Sun, 04 Feb 2024 22:33:40 -0500 Message-ID: References: Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39179"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 05 04:34:24 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rWpkV-000A1C-8y for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Feb 2024 04:34:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWpjr-00020t-Bq; Sun, 04 Feb 2024 22:33:43 -0500 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 1rWpjq-00020c-9W for emacs-devel@gnu.org; Sun, 04 Feb 2024 22:33:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWpjp-0003iT-E6; Sun, 04 Feb 2024 22:33:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=8VdYqD6kfDsWRUDXlcRbfK36LzgmDXR3zoTgRyGLJZw=; b=asZ0lbbD01fJ 1woFwQkiUcsaGnIZHgwCWkdScknIHEsEtKHIl1opQaRgowmJucsfSgSsL1xuvdCsLyTYC6/X2shuF BIJxZHiJWE90liVPVqEnUjcogrihHpDIwSS2cXrjFAC7gtScoLjtTKks29/lGaBH6D2BOnbPAbpKc 7/gm7Yhe7CkVOTXRwwYtD1ZMgZ+m1anlKx2vBCvx1iQymnOrnELNwfUWhHuhp+tYqieb6IE58v8w1 fY7586UrzwGRIbcfU4J/KG0/XeVNqlYucsuBWfuSzsiFRNGfux97YeAC4xRoKeIDBV3IIaHaAEpk4 zjH+6Y8Y1yKc6pU1uborOg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rWpjo-0003HO-6U; Sun, 04 Feb 2024 22:33:40 -0500 In-Reply-To: (message from Stefan Monnier on Fri, 02 Feb 2024 08:17:25 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315877 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Rewriting clause by clause is an interesting idea. However, there are problems to solve. > Throw away cond*-subpat. Just rewrite cond* has extended the patterns. This would discard those extensions, so I have to say no. Rewriting using pcase could be acceptable if those extensions are implemeted in pcase. You would be able to do that, if you want to. > (cond* > ((match* PAT FORM) THEN) > . ELSE) That method works for exiting match* clauses, and this > (cond* > ((match* PAT FORM)) > . REST) for empty no-exit match* clauses, But there are also nonempty ni-exit clauses: > (cond* > (:no-exit (match* PAT FORM) THEN) > . ALWAYS) Can rewriting handle that? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)