[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: Fri, 21 Aug 2015 22:09:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> The answer so far has been when the function accepts
> a function, it should be #', and whenever a symbol, '.

And if it's a function designator it can be either, when both designate
the same function, or one or the other when they designate different

apply takes a function designator (and therefore so do all the functions
that call apply, from funcall, mapcar, etc).

> Because the function definitions don't carry this
> information, I've so far relied on the help (the
> docstrings). Sometimes it says straight out FUNCTION
> (or PREDICATE) and sometimes SYMBOL, and then it is
> easy (tho using the help for this is a bit sketchy to
> begin with). However, sometimes the function parameter
> is named after purpose and the help doesn't say much
> else, and then it is worse.
> Now I'm writing a tool to find all quoted functions in
> my Elisp. What you can't measure, you can't control.

It looks like the documentation of emacs doesn't make the distinction
between function designator and function because a symbol naming a
function is considered to be a function in emacs [ie. (functionp 'car)
-> t].  Therefore in emacs, you could consider that all the function
parameters are of type function designator.

__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]