[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (interactive) and &optional
From: |
Dr Rainer Woitok |
Subject: |
Re: (interactive) and &optional |
Date: |
Sat, 25 Mar 2023 13:05:14 +0100 |
Jean,
On Friday, 2023-03-24 12:23:29 +0300, you wrote:
> ...
> I do not like involving `interactive' at all, so I do the handling by
> providing optional argument and telling function to check for it, or
> ask for it.
>
> (defun search-something (&optional query)
> "Search something by using QUERY."
> (interactive)
> (let* ((query (or query (read-from-minibuffer "Query: "))))
> (do-the-search query)))
Correct me if I'm wrong, but doesn't this unconditionally call "read-
from-minibuffer" when non-interactively called without argument? Non-
interactively I would like the function to simply use my default value.
Anyway, many thanks to you and the others having taken part in this dis-
cussion -- I've learned a few things :-)
Sincerely,
Rainer
- Re: [External] : Re: (interactive) and &optional, (continued)
- Re: (interactive) and &optional, Emanuel Berg, 2023/03/23
- Re: (interactive) and &optional, Jean Louis, 2023/03/24
- Re: (interactive) and &optional, Emanuel Berg, 2023/03/26
- RE: [External] : Re: (interactive) and &optional, Drew Adams, 2023/03/26
- Re: [External] : Re: (interactive) and &optional, John Yates, 2023/03/26
Re: (interactive) and &optional,
Dr Rainer Woitok <=