[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unsure of error in passing an anonymous function to another function
From: |
Ian Zimmerman |
Subject: |
Re: Unsure of error in passing an anonymous function to another function |
Date: |
Sat, 15 Aug 2015 19:56:56 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.