help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: About `funcall'


From: Raffaele Ricciardi
Subject: Re: About `funcall'
Date: Mon, 04 Mar 2013 19:12:29 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

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 via email to

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