From: alexbuhl <alexbuhl@protonmail.com>
To: Heime <heimeborgia@protonmail.com>
Cc: Manuel Giraud <manuel@ledu-giraud.fr>,
Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Actions using symbols
Date: Mon, 02 Sep 2024 19:07:04 +0000 [thread overview]
Message-ID: <_YHZVNg4JOXEsTj2szRkuqy0GFPJoV1dMqWsW5ocAdPyvgb7dSUjICJW9Z_8y3NuYR_ktLjzpVhWE-vSqTws0ppV7iLr-gVD9-iIYCU3e84=@protonmail.com> (raw)
In-Reply-To: <yf4WdbygWyzFmcanP8SxiYhn0Qv6JTWkn5E7DyvmGxe5tpvQSuQyjS_Jzk4wJ9PJ-e7bey38fDQdQmAIWRWRuT1DQDev9ebYV_xHPVl_bOQ=@protonmail.com>
On Tuesday, September 3rd, 2024 at 5:10 AM, Heime <heimeborgia@protonmail.com> wrote:
> Sent with Proton Mail secure email.
>
>
> 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:
>
> > Heime heimeborgia@protonmail.com 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
>
>
> 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 ?
I should have meant this actually
(let ((actn 'mapcar))
(dothat actn))
prev parent reply other threads:[~2024-09-02 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 12:30 Actions using symbols Heime
2024-09-02 13:38 ` Manuel Giraud via Users list for the GNU Emacs text editor
2024-09-02 17:10 ` Heime
2024-09-02 19:07 ` alexbuhl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='_YHZVNg4JOXEsTj2szRkuqy0GFPJoV1dMqWsW5ocAdPyvgb7dSUjICJW9Z_8y3NuYR_ktLjzpVhWE-vSqTws0ppV7iLr-gVD9-iIYCU3e84=@protonmail.com' \
--to=alexbuhl@protonmail.com \
--cc=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=manuel@ledu-giraud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).