]> git.eshelyaron.com Git - emacs.git/commitdiff
Support list of default values in completing-read-multiple
authorBasil L. Contovounesios <contovob@tcd.ie>
Thu, 12 Apr 2018 20:36:45 +0000 (23:36 +0300)
committerJuri Linkov <juri@linkov.net>
Thu, 12 Apr 2018 20:36:45 +0000 (23:36 +0300)
* 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)

lisp/emacs-lisp/crm.el

index 5aa856f467ce6305e434fd532508a3b9c6ad9639..3ec0bd81cf4fa476d7b45f15d1b28fa1e337f7b9 100644 (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