From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: what does (interactive "P") do? Date: Thu, 21 Nov 2002 00:40:01 +0100 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1037835924 1481 80.91.224.249 (20 Nov 2002 23:45:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 23:45:24 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EeX4-0000Nd-00 for ; Thu, 21 Nov 2002 00:45:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EeYi-00061O-00; Wed, 20 Nov 2002 18:47:04 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-193-073.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: dialin-145-254-193-073.arcor-ip.net (145.254.193.73) Original-X-Trace: fu-berlin.de 1037835617 19366014 145.254.193.73 (16 [87814]) X-Operating-System: GNU/Linux, built from scratch: http://www.linuxfromscratch.org/ X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.1.2600) Cancel-Lock: sha1:z5c/NYTzvmJKcCPh0W8JkSDnoEg= Original-Xref: shelby.stanford.edu gnu.emacs.help:107271 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3826 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3826 seberino@spawar.navy.mil writes: > I just saw (interactive "P") in a .emacs and > wondered what it did. I assume (interactive) > lets a user run a function v. just being > run from another function. It declares that the function is a command. That is, a user may run it via M-x and it may be bound to a keystroke. > What extra functiononality does the "P" give you? With "P" in the spec string of `interactive' the prefix (`C-u ...') is passed in raw form as an argument to the function. It is typically used in forms like (my-fancy-function (prefix) (interactive "P") ... (if (prefix) (do-something) (do-something-different)) ...) See `C-h f interactive RET' for a complete list of code letters for `interactive'. Oliver -- 1 Frimaire an 211 de la Révolution Liberté, Egalité, Fraternité!