1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 22:41:06 -08:00

Support list of default values in completing-read-multiple

* lisp/emacs-lisp/crm.el (completing-read-multiple):
Consider head of DEF argument when specified as a list,
as per completing-read-default. (bug#30072)
This commit is contained in:
Basil L. Contovounesios 2018-04-12 23:36:45 +03:00 committed by Juri Linkov
parent 7643fbb452
commit 3d6fa0b1e0

View file

@ -263,7 +263,8 @@ with empty strings removed."
(input (read-from-minibuffer
prompt initial-input map
nil hist def inherit-input-method)))
(and def (string-equal input "") (setq input def))
(when (and def (string-equal input ""))
(setq input (if (consp def) (car def) def)))
;; Remove empty strings in the list of read strings.
(split-string input crm-separator t)))
(remove-hook 'choose-completion-string-functions