all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* About `funcall'
@ 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>
  0 siblings, 2 replies; 7+ messages in thread
From: Xue Fuqiao @ 2013-03-04 12:52 UTC (permalink / raw)
  To: help-gnu-emacs

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.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <mailman.21339.1362401601.855.help-gnu-emacs@gnu.org>]
* Re: About `funcall'
@ 2013-03-04 22:59 Xue Fuqiao
  0 siblings, 0 replies; 7+ messages in thread
From: Xue Fuqiao @ 2013-03-04 22:59 UTC (permalink / raw)
  To: help-gnu-emacs

> Xue Fuqiao <xfq.free@gmail.com> writes:
>
>> 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' returns the first argument that is not nil, or nil when all the
> arguments are nil.

I see, thanks.

>     (defmacro .or (&rest args)
>       (if (null args)
>          'nil
>          (let ((var (gensym)))
>           `(let ((,var ,(first args)))
>              (if ,var
>                 ,var
>                 (.or ,@(rest args)))))))
>
>     (macroexpand '(.or a b))
>     --> (let ((#1=#:G90861 a)) (if #1# #1# (\.or b)))--

What does "(first args)" mean here?  Does it mean "(car args)"?



^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <mailman.21404.1362437985.855.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-03-04 23:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 12:52 About `funcall' 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
     [not found] <mailman.21339.1362401601.855.help-gnu-emacs@gnu.org>
2013-03-04 19:12 ` Raffaele Ricciardi
2013-03-04 19:15 ` Pascal J. Bourguignon
  -- strict thread matches above, loose matches on Subject: below --
2013-03-04 22:59 Xue Fuqiao
     [not found] <mailman.21404.1362437985.855.help-gnu-emacs@gnu.org>
2013-03-04 23:23 ` Pascal J. Bourguignon

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.