[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to quote a list of functions?

From: Pascal J. Bourguignon
Subject: Re: How to quote a list of functions?
Date: Sat, 22 Aug 2015 01:46:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> Here is an interesting case with apply. If "find-f" is
> sharp quoted, it won't work!
> (defun find-file-at-line (&optional other-window)
>   (interactive "P")
>   (let ((possible-filename (thing-at-point 'filename))
>         (find-f (if other-window 'find-file-other-window 'find-file)) )
>     (if (and possible-filename (file-exists-p possible-filename))
>           (apply find-f `(,possible-filename))
>       (progn
>         (forward-char 1)
>         (find-file-at-line) ))))

Of course, here find-f is not the name of a function (the symbol find-f
is not fbound to a function object), it's a variable (the variable named
by the symbol find-f is bound to a symbol denoting a function).

__Pascal Bourguignon__       
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]