[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interactive and &optional arguments
From: |
Stefan Monnier |
Subject: |
Re: interactive and &optional arguments |
Date: |
Mon, 25 Feb 2013 22:15:14 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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?
Just use a (interactive <spec>) where <spec> is not a string but some
Elisp expression that computes the arguments you want to provide to
the function.
Stefan