From: Lars Magne Ingebrigtsen <larsi@gnus.org>
Subject: Re: Default arg for `T m'?
Date: Sat, 19 Jan 2002 20:38:36 +0100 [thread overview]
Message-ID: <m3pu46w2pv.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <vafk7v1j8of.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de>
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> So we don't use the INITIAL-INPUT argument of completing-read;
> instead, we use the DEF argument and also put the default in the
> history.
Right. I've now modified `T m' to use the function below. I think
the "normal" `completing-read' is rather to horrible to work with,
since you have to fiddle so much to get it to work in a sensible way.
But I may have overlooked something.
(defun gnus-completing-read (prompt table &optional predicate require-match
history inherit-input-method)
(when (and history
(not (boundp history)))
(set history nil))
(completing-read
(if (symbol-value history)
(concat prompt " (" (car (symbol-value history)) "): ")
(concat prompt ": "))
table
predicate
require-match
nil
history
(car (symbol-value history))
inherit-input-method))
And used thusly:
(gnus-completing-read "Move to topic" gnus-topic-alist
nil t 'gnus-topic-history)
Any comments? And anybody volunteering to go through the Gnus sources
and converting all calls to `completing-read' to
`gnus-completing-read' to get Emacs-compliant default prompt value
behavior?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
prev parent reply other threads:[~2002-01-19 19:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-10 14:42 Kai Großjohann
2001-12-30 0:41 ` Lars Magne Ingebrigtsen
2002-01-02 11:26 ` Kai Großjohann
2002-01-19 19:38 ` Lars Magne Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3pu46w2pv.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).