all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Raffaele Ricciardi <rfflrccrd@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: About `funcall'
Date: Mon, 04 Mar 2013 19:12:29 +0000	[thread overview]
Message-ID: <apka0vF9qsgU1@mid.individual.net> (raw)
In-Reply-To: <mailman.21339.1362401601.855.help-gnu-emacs@gnu.org>

On 04/03/13 12:52, Xue Fuqiao wrote:
> In `yank-pop', there is an sexp about `funcall':
>
>    (funcall (or yank-undo-function 'delete-region) (point) (mark t))
>
> IIRC the first argument for `funcall' should be a function, so I'm
> confused with this usage.  Can somebody explain it to me?  Thanks.
>

(or yank-undo-function 'delete-region)

evaluates to a function, which is either the value of yank-undo-function 
or 'delete-region. Compare for instance this snippet, where `add' is a 
variable whose value is the function '+:

(let ((add '+))
   ;; Add if yes, otherwise multiply.
   (funcall (if (yes-or-no-p "Add?") add '*) 4 4))


       reply	other threads:[~2013-03-04 19:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.21339.1362401601.855.help-gnu-emacs@gnu.org>
2013-03-04 19:12 ` Raffaele Ricciardi [this message]
2013-03-04 19:15 ` About `funcall' Pascal J. Bourguignon
     [not found] <mailman.21404.1362437985.855.help-gnu-emacs@gnu.org>
2013-03-04 23:23 ` Pascal J. Bourguignon
2013-03-04 22:59 Xue Fuqiao
  -- strict thread matches above, loose matches on Subject: below --
2013-03-04 12:52 Xue Fuqiao
2013-03-04 12:57 ` Xue Fuqiao
     [not found] ` <mailman.21340.1362401871.855.help-gnu-emacs@gnu.org>
2013-03-04 14:11   ` Michael Heerdegen

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

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

  git send-email \
    --in-reply-to=apka0vF9qsgU1@mid.individual.net \
    --to=rfflrccrd@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.