emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 3d6fa0b: Support list of default values in completi


From: Juri Linkov
Subject: [Emacs-diffs] master 3d6fa0b: Support list of default values in completing-read-multiple
Date: Thu, 12 Apr 2018 16:37:07 -0400 (EDT)

branch: master
commit 3d6fa0b1e085a987588d5b3a54d91abfee42ceea
Author: Basil L. Contovounesios <address@hidden>
Commit: Juri Linkov <address@hidden>

    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)
---
 lisp/emacs-lisp/crm.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 5aa856f..3ec0bd8 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



reply via email to

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