From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Actions using symbols Date: Mon, 02 Sep 2024 15:38:14 +0200 Message-ID: <8734mi5g6x.fsf@ledu-giraud.fr> References: Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30046"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 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 15:39:05 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 1sl7Gr-0007cr-Dg for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Sep 2024 15:39:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sl7GD-0008Q3-0k; Mon, 02 Sep 2024 09:38:25 -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 1sl7GA-0008PY-QT for help-gnu-emacs@gnu.org; Mon, 02 Sep 2024 09:38:23 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sl7G8-0008O4-K9 for help-gnu-emacs@gnu.org; Mon, 02 Sep 2024 09:38:22 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=+2da0Ul0 8BMVGbi2AVyH3nY9AMP5i72SRAdgsyK4OfM=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=/X3W9h1qMBA1ITEXcCvnjNjNlZuoKP g6ahPOxDeNaGIAz0nepALnG+ZU3rEEyf+bh58AOkKTh+wAwZm6wRHcAQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=+2da0Ul08BMVGbi2 AVyH3nY9AMP5i72SRAdgsyK4OfM=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=wU3mNBEFw24Q3pdxO7czzorOkWft2CkCzu7EVO GBbOxNme6EMB+W7wlpk0AIn8GFH8ynK9/NYJc9XPKOfIEOj2uXLwczuut+xz2wBnIgH8CQ kR0sNxeFg8WA1rAr9rU74joasTq3eECOhMPjquatZEbAsQFYW5bh7GTK2V6xm5QNyWuxFG D/SmDURpPDKuvP8mwkehvU0NkNu6qsfn7ioVaYpxTouP3+fiTO9kW79a5fiRKF2oW/NDAM yfJB+KR4uqsiSXpE8TqqaZstQQFKwDEvFK1u3vvvlWhklmu0zS6OyzmCXacZBfbp6s2cus EcHUtPGVT8gGQXdxr1gXVPNg== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 8baeaac8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 2 Sep 2024 15:38:15 +0200 (CEST) In-Reply-To: (Heime's message of "Mon, 02 Sep 2024 12:30:34 +0000") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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:147887 Archived-At: Heime writes: > I customarily make symbols that I can check on as conditionals > > (defun myfunc (actn) > (when (eq actn 'something) dothis) > > Would things go wrong should I start using function names as arguments No. > For instance, myfunc would use a mapcar implementation when ACTN is > 'mapcar and an apply-partially implementation when ACTN is 'apply-partially > > (defun myfunc (actn) > (when (eq actn 'mapcar) dothis) > (when (eq actn 'apply-partially) dothat) This is correct code. -- Manuel Giraud