summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/crm.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2018-04-12 23:36:45 +0300
committerJuri Linkov <juri@linkov.net>2018-04-12 23:36:45 +0300
commit3d6fa0b1e085a987588d5b3a54d91abfee42ceea (patch)
tree34bdb013ac07a57ac2ad6b2ef8cfa77e293b150d /lisp/emacs-lisp/crm.el
parent7643fbb45273c70dafa53a8c844726c9920cd7bd (diff)
downloademacs-3d6fa0b1e085a987588d5b3a54d91abfee42ceea.tar.gz
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)
Diffstat (limited to 'lisp/emacs-lisp/crm.el')
-rw-r--r--lisp/emacs-lisp/crm.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 5aa856f467c..3ec0bd81cf4 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -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