[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suppress user-prompting when calling commands in programs
From: |
Stefan Monnier |
Subject: |
Re: Suppress user-prompting when calling commands in programs |
Date: |
Fri, 13 Jun 2014 14:55:36 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> I tried convincing upstream before and never made it! And I actually
> understand the authors of code like that and even copied that technique
> sometimes, because it might be harder to write the interactive spec for
> both interactive and programmatical use than to write the function
> itself, and then there is no need for a wrapper command or interactive
> (lambda ...) expression when it comes to define a key for that command.
I don't know what complications you're referring to.
In 99% of the cases you can just turn
(defun foo (&optional arg)
(interactive "P")
(let ((bar (org-icompleting-read ...)))))
into
(defun foo (bar &optional arg)
(interactive
(list (org-icompleting-read ...) current-prefix-arg))
I'm not saying it's always perfect, but there's clearly some difference
between my experience and yours, so if you give some examples, it would help.
Stefan
- Re: Suppress user-prompting when calling commands in programs, (continued)
Re: Suppress user-prompting when calling commands in programs, Nicolas Richard, 2014/06/13
- Re: Suppress user-prompting when calling commands in programs, Thorsten Jolitz, 2014/06/13
- RE: Suppress user-prompting when calling commands in programs, Drew Adams, 2014/06/13
- Re: Suppress user-prompting when calling commands in programs, Thorsten Jolitz, 2014/06/13
- Re: Suppress user-prompting when calling commands in programs, Eric Abrahamsen, 2014/06/13
- RE: Suppress user-prompting when calling commands in programs, Drew Adams, 2014/06/13
- Re: Suppress user-prompting when calling commands in programs, Eric Abrahamsen, 2014/06/13
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