From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: new `pcase-let' syntax Date: Thu, 24 Nov 2022 19:06:16 +0000 Message-ID: <87cz9c2mvr.fsf@posteo.net> References: <87o7syezkm.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26962"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 20:07:14 2022 Return-path: Envelope-to: geh-help-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 1oyHZ4-0006nZ-Ii for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 20:07:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyHYM-00073p-99; Thu, 24 Nov 2022 14:06:30 -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 1oyHYL-00073g-EU for help-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:06:29 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyHYI-0002RR-Ln for help-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:06:29 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D7476240029 for ; Thu, 24 Nov 2022 20:06:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669316776; bh=49NC5fP3OVhxeLOUUxVZz3CskA4cbWS3alpmJW/oz6o=; h=From:To:Subject:Date:From; b=KBS9wsiMC5DxsbGfRlaFrieKJOrWN8ODgaVTK7tDX8OcB9ckJyAxENxELd/qLAnJ3 5qx4q8RNlaTQugcp3BdD5lNu8pOWMX1CQRQnuKroha3yJBjcQQWc4WUumPQwtW68mQ hVKVQqyokS4Wrbp8zfWTa7jKiiWEOkkpfdHHwmj8fw5zBr2V2MWTvS6aRIfwbkcGA+ BDGuI0HVOBTk8w6mK4qow4ESGLTNvT3Ixcvauj+UM8uG1W3qmXRP+0S3n8ZV2GdK4B XbwZ7st8ccFsOqMkDY7Q8QCGF0PDw7Z3dnl5I7Vto/pqi4JBACYkr1O+Apmypw1MN6 5vbfEn4ozN0qw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NJ6sh1fprz6tnw for ; Thu, 24 Nov 2022 20:06:15 +0100 (CET) In-Reply-To: <87o7syezkm.fsf@dataswamp.org> (Emanuel Berg's message of "Wed, 23 Nov 2022 11:26:49 +0100") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141150 Archived-At: Emanuel Berg writes: > Check out this syntax with `pcase-let'! :O > > (pcase-let ((`(,up ,down) (if button > `(,#'backward-button ,#'forward-button) > `(,#'previous-line ,#'forward-line) ))) ... ) In what sense is this new? I also get the feeling this is a hack for the sake of a hack. Is it really that much better than the "classical" --8<---------------cut here---------------start------------->8--- (let ((up #'previous-line) (down #'forward-line)) (when button (setq up #'backward-button down #'forward-button)) ;; ... ) --8<---------------cut here---------------end--------------->8---