From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: alexbuhl Newsgroups: gmane.emacs.help Subject: Re: Actions using symbols Date: Mon, 02 Sep 2024 19:07:04 +0000 Message-ID: <_YHZVNg4JOXEsTj2szRkuqy0GFPJoV1dMqWsW5ocAdPyvgb7dSUjICJW9Z_8y3NuYR_ktLjzpVhWE-vSqTws0ppV7iLr-gVD9-iIYCU3e84=@protonmail.com> References: <8734mi5g6x.fsf@ledu-giraud.fr> 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="33726"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Manuel Giraud , Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 02 21:07:54 2024 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 1slCP4-0008Zk-5c for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Sep 2024 21:07:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slCOW-00076z-E9; Mon, 02 Sep 2024 15:07:20 -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 1slCOU-00076b-5Q for help-gnu-emacs@gnu.org; Mon, 02 Sep 2024 15:07:18 -0400 Original-Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slCOS-0001cX-8T for help-gnu-emacs@gnu.org; Mon, 02 Sep 2024 15:07:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1725304029; x=1725563229; bh=x/0MeBhKO+9oQr+DHh/aMbPYx+SZcQfJXxIfDwGUWtU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=eBPPljCUILpBUj1sPd3zy2cyFhsaRfJXUGABvaHyeukp+Nb8E5B5Dndyn3+h8mKYA 73gZWGbxri8/fvbp0FPiQTDD0A+13ju2b8CE6oF9ws/fpfkskog3W4p/+/9Jh6dJAS /6s3HUdkMl//igITNkyCikQs7Xt4gN/fp8jaSDgerWErSjYnEL5x0LyM9lx1QV0H01 zgOsmK77U9wupG9rMMgdEVS3XDwCpvTwnPKsNQia0Zf5T7rKBSo9awCpck5KAsPE+r ijnpkSvltyU6+CNahVETplRX8R71HlSjR7O1K9Ci8nNHbzJsRgscu0ZNh2ECsqsRcl DS4+OCYAYCPDQ== In-Reply-To: Feedback-ID: 51920095:user:proton X-Pm-Message-ID: 14918635ec888ec1a87205ccd1e8d3341472dda8 Received-SPF: pass client-ip=188.165.51.139; envelope-from=alexbuhl@protonmail.com; helo=mail-0301.mail-europe.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:147889 Archived-At: On Tuesday, September 3rd, 2024 at 5:10 AM, Heime wrote: =20 > Sent with Proton Mail secure email. >=20 >=20 > On Tuesday, September 3rd, 2024 at 1:38 AM, Manuel Giraud via Users list = for the GNU Emacs text editor help-gnu-emacs@gnu.org wrote: >=20 > > Heime heimeborgia@protonmail.com writes: > >=20 > > > I customarily make symbols that I can check on as conditionals > > >=20 > > > (defun myfunc (actn) > > > (when (eq actn 'something) dothis) > > >=20 > > > Would things go wrong should I start using function names as argument= s > >=20 > > No. > >=20 > > > For instance, myfunc would use a mapcar implementation when ACTN is > > > 'mapcar and an apply-partially implementation when ACTN is 'apply-par= tially > > >=20 > > > (defun myfunc (actn) > > > (when (eq actn 'mapcar) dothis) > > > (when (eq actn 'apply-partially) dothat) > >=20 > > This is correct code. > > -- > > Manuel Giraud >=20 >=20 > What happens when I do (let ((actn 'mapcar)) ? It is actually setting > actn to the 'mapcar symbol. When one defines the function mapcar, does > elisp also make the symbol 'mapcar ? =20 I should have meant this actually=20 (let ((actn 'mapcar)) (dothat actn)) =20