unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Decebal'" <CLDWesterhof@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Function pointer
Date: Tue, 14 Apr 2009 07:37:50 -0700	[thread overview]
Message-ID: <000601c9bd0e$973255e0$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <1ca52c6e-ca27-4ffe-aa95-27b9bbfebe61@z14g2000yqa.googlegroups.com>

> > >     (function)
> > > this gives wrong number of arguments.
...
> > The very short answer to your question: Use funcall, as in
> >     (funcall function)
> 
> Works likes a charm. Now I have the tools to build the 'little'
> functionality I wanted. Thanks.

BTW, the reason the error message complained about the wrong number of args is
that `function' is an existing special form - `C-h f function':

,----
| function is a special form in `C source code'.
| 
| (function arg)
| 
| Like `quote', but preferred for objects which are functions.
| In byte compilation, `function' causes its argument to be compiled.
| `quote' cannot do that.
`----

"Function" (special form) `function' expects one argument, and you gave it zero
args.





      reply	other threads:[~2009-04-14 14:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14  7:20 Function pointer Decebal
2009-04-14  8:02 ` Harald Hanche-Olsen
2009-04-14  8:41   ` Decebal
2009-04-14 14:37     ` Drew Adams [this message]

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='000601c9bd0e$973255e0$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=CLDWesterhof@gmail.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).