From: aartist <aartist@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Programmatically creating functions
Date: Tue, 21 Oct 2008 11:22:16 -0700 (PDT) [thread overview]
Message-ID: <69e01833-5362-47b3-beca-ef0e4684c42b@u28g2000hsc.googlegroups.com> (raw)
In-Reply-To: mailman.1730.1224610023.25473.help-gnu-emacs@gnu.org
Do you think that skeleton or macro can help?
On Oct 21, 1:26 pm, Ian Eure <i...@digg.com> wrote:
> So, I have a list of symbols:
>
> '(foo bar baz)
>
> I want to iterate over the list and create a function from each which
> does something like this:
>
> (defun call-foo ()
> (interactive)
> (invoke-stuff 'foo)
>
> How can I accomplish this? I can't figure out how to create the
> function. I've tried a number of approaches, but have not met with
> success.
>
> - eval'ing the defun. Returns a function symbol, but I can't call
> it. Maybe it's only created within the scope of the (eval) and not
> callable from outside?
>
> - Creating a symbol and using fset to assign a lambda to it's
> function cell. It sort of works, but I'm unclear on how to pass a
> variable function name to defun, nor am I clear on how I can make sure
> it calls invoke-stuff with the right symbol.
>
> Help?
>
> - Ian
next parent reply other threads:[~2008-10-21 18:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1730.1224610023.25473.help-gnu-emacs@gnu.org>
2008-10-21 18:22 ` aartist [this message]
2008-10-21 18:34 ` Programmatically creating functions Joost Diepenmaat
2008-10-21 18:57 ` Andreas Politz
2008-10-25 18:28 ` Ian Eure
[not found] ` <mailman.2073.1224959342.25473.help-gnu-emacs@gnu.org>
2008-10-28 20:29 ` Emil
2008-10-21 17:26 Ian Eure
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69e01833-5362-47b3-beca-ef0e4684c42b@u28g2000hsc.googlegroups.com \
--to=aartist@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.