From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: interactive and &optional arguments Date: Tue, 26 Feb 2013 03:09:07 +0100 Message-ID: <87a9qromgs.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361844570 22716 80.91.229.3 (26 Feb 2013 02:09:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 02:09:30 +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 Feb 26 03:09:50 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 1UA9zK-0003ba-Af for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Feb 2013 03:09:50 +0100 Original-Received: from localhost ([::1]:56170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA9yz-0002BZ-4h for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 21:09:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA9yt-0002Ah-KB for help-gnu-emacs@gnu.org; Mon, 25 Feb 2013 21:09:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA9yr-0006ja-Bg for help-gnu-emacs@gnu.org; Mon, 25 Feb 2013 21:09:23 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA9yr-0006jP-4t for help-gnu-emacs@gnu.org; Mon, 25 Feb 2013 21:09:21 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UA9zA-0003XJ-2p for help-gnu-emacs@gnu.org; Tue, 26 Feb 2013 03:09:40 +0100 Original-Received: from g231233014.adsl.alicedsl.de ([92.231.233.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Feb 2013 03:09:40 +0100 Original-Received: from tjolitz by g231233014.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Feb 2013 03:09:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231233014.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:mDWqkH6wMYc0yiHEV9i3bVZxBGs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:89256 Archived-At: Hi List, sometimes I want a function with &optional args to be interactive, and I wonder if there is a way to, as default action, interactively call the function via M-x without args, except the user does something special - e.g. C-u M-x - and only then ask the user for input? That is ,----------------------------------------- | (defun foo (&optional arg1 arg2 arg3) | (interactive "???") | ...) | | M-x foo ; call foo without args | C-u M-x foo ; ask the user for input `----------------------------------------- or something similar? -- cheers, Thorsten