[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suppress user-prompting when calling commands in programs
From: |
Eric Abrahamsen |
Subject: |
Re: Suppress user-prompting when calling commands in programs |
Date: |
Sat, 14 Jun 2014 11:33:08 +0800 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) |
Drew Adams <drew.adams@oracle.com> writes:
[...]
> What's wrong with them pushing the read into the interactive spec?
>
> (defun foo (&optional arg bar)
> (interactive (list current-prefix-arg
> (org-icompleting-read ...))))
> ...)
A quick side-question: Everyone here is using &optional for the prefix
arg name. I have several functions lying around that use the "P"
interactive spec but don't specify arg as &optional, and seem to work
fine. My understanding is that, if there is no prefix arg, arg will
simply be nil, as it should be.
Apart from style/code clarity, are there other reasons for specifying
&optional?
Thanks,
E
Message not available
RE: Suppress user-prompting when calling commands in programs, Drew Adams, 2014/06/14
Re: Suppress user-prompting when calling commands in programs, Thorsten Jolitz, 2014/06/14