From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.help Subject: Re: About `funcall' Date: Tue, 05 Mar 2013 06:59:37 +0800 Organization: The Church of Emacs Message-ID: <51352759.80206@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1362437998 30550 80.91.229.3 (4 Mar 2013 22:59:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Mar 2013 22:59:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 05 00:00:22 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCeMm-0001JU-Pa for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Mar 2013 00:00:20 +0100 Original-Received: from localhost ([::1]:55864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCeMN-0003pi-2S for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Mar 2013 17:59:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCeMC-0003pS-3t for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 17:59:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCeMB-00024P-6J for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 17:59:44 -0500 Original-Received: from mail-pb0-f45.google.com ([209.85.160.45]:45385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCeMB-00024K-0J for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 17:59:43 -0500 Original-Received: by mail-pb0-f45.google.com with SMTP id ro8so3539844pbb.32 for ; Mon, 04 Mar 2013 14:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:organization:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=hHEqrkk/6CdoULO7P4bfgzcde6lu1ba9qVqxYXpkF/Q=; b=JDSJLCzIU69L7HJDv30Ni0+C2Ko0wPWUIAajimUqf2hTLMoSaeJsLH7SXlPbQKJsQa uFGHzut4L79agzPhlNQKFfeygk12hS8Jk6AKhuDdotg9ug7xprLI2IPh5VqYkcP9Ba6Z a6Z93a3olOAPeAzNwc7TQ6wNfxiPSAJRNCU/bq4QLK12hgJNJLo/IZiStOHk4GJdBhl8 dkDc2/++9sBGViuYx0pAnz+FJJJTKMKgU5w7wWPHX/AvTNctpHKvwlML89sFayAPELS5 +ubOk1YfToPFE7oFZaF7to0ki/pN4S8pt/N38KHLRuO0r191z6E2c8snEGKYnfOtD9fb 5zog== X-Received: by 10.68.218.201 with SMTP id pi9mr31406246pbc.127.1362437981400; Mon, 04 Mar 2013 14:59:41 -0800 (PST) Original-Received: from [192.168.1.101] ([61.149.226.203]) by mx.google.com with ESMTPS id qp13sm23950485pbb.3.2013.03.04.14.59.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Mar 2013 14:59:40 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.45 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89352 Archived-At: > Xue Fuqiao 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)"?