From: Ian Zimmerman <itz@buug.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Unsure of error in passing an anonymous function to another function
Date: Sat, 15 Aug 2015 19:56:56 -0700 [thread overview]
Message-ID: <20150816025351.4645.2209B812@ahiker.mooo.com> (raw)
In-Reply-To: <CAAjq1mcFTf5=f2FSKjBGPuL7OTTftLuCPsjyFMdpZ-Kk5nhTJg@mail.gmail.com>
On 2015-08-15 21:44 -0500, Grant Rettke wrote:
> What am I doing wrong?
Elisp is not Scheme (sadly). Function bindings are separate from
variable bindings. To use the function binding you need funcall (which
see in the docs).
> (defun doer (fn)
> (interactive)
> (save-excursion
> (goto-char (point-min))
> (fn)))
(defun doer (fn)
(interactive)
(save-excursion
(goto-char (point-min))
(funcall fn)))
Btw, please don't use that "pretty" quoting, it just gets in the way.
--
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.
next prev parent reply other threads:[~2015-08-16 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-16 2:44 Unsure of error in passing an anonymous function to another function Grant Rettke
2015-08-16 2:56 ` Ian Zimmerman [this message]
[not found] ` <mailman.8406.1439693823.904.help-gnu-emacs@gnu.org>
2015-08-16 3:05 ` Rusi
2015-08-17 7:53 ` Joost Kremers
2015-08-17 17:41 ` Grant Rettke
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=20150816025351.4645.2209B812@ahiker.mooo.com \
--to=itz@buug.org \
--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.