unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: funcallable-p?
Date: Mon, 27 Aug 2007 00:05:25 -0400	[thread overview]
Message-ID: <jwvwsvhk4i1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICCEAMDPAA.drew.adams@oracle.com> (Drew Adams's message of "Sat\, 25 Aug 2007 23\:01\:32 -0700")

>> > What's a good way to test the first argument to `funcall' or `apply', to
>> > ensure that it is appropriate?
>> 
>> `functionp'
>> 
>> > `functionp' won't do it, because it allows special forms and macros.
>> 
>> If it does it's a bug: please report it with a precise test case.

> That's the impression I got from 1) the doc and 2) (functionp 'and) -> t,
> (funcall 'and t) -> Invalid function: and.

> Elisp manual: "This function returns `t' if OBJECT is any kind of function,
> or a special form, or, recursively, a symbol whose function definition is a
> function or special form.  (This does not include macros.)"

Indeed you're right.  I think it's an error in functionp.
Please report it via M-x report-emacs-bug.


        Stefan

  reply	other threads:[~2007-08-27  4:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5334.1188088931.32220.help-gnu-emacs@gnu.org>
2007-08-26  5:07 ` funcallable-p? Stefan Monnier
2007-08-26  6:01   ` funcallable-p? Drew Adams
2007-08-27  4:05     ` Stefan Monnier [this message]
2007-08-27  5:11       ` funcallable-p? Drew Adams
2007-08-27 13:55         ` funcallable-p? Stefan Monnier
2007-08-27 14:41           ` funcallable-p? Drew Adams
2007-08-27 20:08             ` funcallable-p? Stefan Monnier
     [not found] <mailman.5340.1188108088.32220.help-gnu-emacs@gnu.org>
2007-08-26 10:53 ` funcallable-p? Daniel Jensen
2007-08-26 13:08   ` funcallable-p? Pascal Bourguignon
2007-08-26 14:32     ` funcallable-p? Daniel Jensen
2007-08-27 10:16       ` funcallable-p? Pascal Bourguignon
2007-08-26 14:43   ` funcallable-p? Drew Adams
2007-08-26 22:44 ` funcallable-p? Johan Bockgård
2007-08-27  0:03   ` funcallable-p? Drew Adams
2007-08-27  3:20   ` funcallable-p? Eli Zaretskii
     [not found]   ` <mailman.5381.1188184866.32220.help-gnu-emacs@gnu.org>
2007-08-27 18:04     ` funcallable-p? Johan Bockgård
2007-08-26  0:40 funcallable-p? Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwsvhk4i1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=drew.adams@oracle.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).