[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
interactive and &optional arguments
From: |
Thorsten Jolitz |
Subject: |
interactive and &optional arguments |
Date: |
Tue, 26 Feb 2013 03:09:07 +0100 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux) |
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
- interactive and &optional arguments,
Thorsten Jolitz <=