bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12331: 24.1; completing-read when COLLECTION has exactly one element


From: Roland Winkler
Subject: bug#12331: 24.1; completing-read when COLLECTION has exactly one element
Date: Sat, 01 Sep 2012 20:38:23 -0500

Suggestion:

If the arg COLLECTION of completing-read is a list with exactly one
element and REQUIRE-MATCH is t, it can be quite redundant to go via
the minibuffer. Would it make sense if in such a case
completing-read could skip the minibuffer completely and simply
return the car of COLLECTION?

The specific situation that made me think about this was the command
ibuffer-switch-to-saved-filter-groups when
ibuffer-saved-filter-groups is a list with one element. Of course,
the surrounding code could also shortcut the call of completing-read
in such a case. But completing-read is possibly the better place to
implement such a behavior, say via a particular value of
REQUIRE-MATCH.


In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2012-06-10 on regnitz
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
Configured using:
 `configure '--prefix=/home/winkler/emacs/24.1''






reply via email to

[Prev in Thread] Current Thread [Next in Thread]