From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "alin.s" Newsgroups: gmane.emacs.devel Subject: Re: interactive? Date: Mon, 18 Jan 2010 06:03:52 -0800 (PST) Message-ID: <27210930.post@talk.nabble.com> References: <27210523.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1263823595 4938 80.91.229.12 (18 Jan 2010 14:06:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2010 14:06:35 +0000 (UTC) To: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 18 15:06:27 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWsFD-0008D9-ET for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2010 15:06:15 +0100 Original-Received: from localhost ([127.0.0.1]:46418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWsFE-0002lV-4B for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2010 09:06:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWsD1-0000oF-Vt for emacs-devel@gnu.org; Mon, 18 Jan 2010 09:04:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWsCx-0000ki-9e for Emacs-devel@gnu.org; Mon, 18 Jan 2010 09:03:59 -0500 Original-Received: from [199.232.76.173] (port=56506 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWsCx-0000kc-2p for Emacs-devel@gnu.org; Mon, 18 Jan 2010 09:03:55 -0500 Original-Received: from kuber.nabble.com ([216.139.236.158]:44081) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWsCw-0003UA-GV for Emacs-devel@gnu.org; Mon, 18 Jan 2010 09:03:54 -0500 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NWsCu-0004C2-NQ for Emacs-devel@gnu.org; Mon, 18 Jan 2010 06:03:52 -0800 In-Reply-To: X-Nabble-From: alinsoar@voila.fr X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120203 Archived-At: I see now. one can check whether an object is interactive using commandp. For example, to check whether a lambda-expression is interactive, it does exactly as we know: it checks the cadr after the argument list, and compare with the symbol 'interactive, etc. /* Lists may represent commands. */ if (!CONSP (fun)) return Qnil; funcar = XCAR (fun); if (EQ (funcar, Qlambda)) return !NILP (Fassq (Qinteractive, Fcdr (XCDR (fun)))) ? Qt : if_prop; And DEFUN(interactive) is Qnil means that if an object is defined interactive, that means nothing unless checked using commandp. This is what I did understand, thank you. Andreas Schwab-2 wrote: > > "alin.s" writes: > >> Where in the evaluator one makes the diff between interactive and >> non-interactive? > > commandp is a built-in function in `C source code'. > > (commandp function &optional for-call-interactively) > > Non-nil if function makes provisions for interactive calling. > This means it contains a description for how to read arguments to give it. > The value is nil for an invalid function or a symbol with no function > definition. > > Interactively callable functions include strings and vectors (treated > as keyboard macros), lambda-expressions that contain a top-level call > to `interactive', autoload definitions made by `autoload' with non-nil > fourth argument, and some of the built-in functions of Lisp. > > Also, a symbol satisfies `commandp' if its function definition does so. > > If the optional argument for-call-interactively is non-nil, > then strings and vectors are not accepted. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." > > > > -- View this message in context: http://old.nabble.com/interactive--tp27210523p27210930.html Sent from the Emacs - Dev mailing list archive at Nabble.com.