diff options
| author | Basil L. Contovounesios | 2018-04-12 23:36:45 +0300 |
|---|---|---|
| committer | Juri Linkov | 2018-04-12 23:36:45 +0300 |
| commit | 3d6fa0b1e085a987588d5b3a54d91abfee42ceea (patch) | |
| tree | 34bdb013ac07a57ac2ad6b2ef8cfa77e293b150d | |
| parent | 7643fbb45273c70dafa53a8c844726c9920cd7bd (diff) | |
| download | emacs-3d6fa0b1e085a987588d5b3a54d91abfee42ceea.tar.gz emacs-3d6fa0b1e085a987588d5b3a54d91abfee42ceea.zip | |
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)
| -rw-r--r-- | lisp/emacs-lisp/crm.el | 3 |
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." | |||
| 263 | (input (read-from-minibuffer | 263 | (input (read-from-minibuffer |
| 264 | prompt initial-input map | 264 | prompt initial-input map |
| 265 | nil hist def inherit-input-method))) | 265 | nil hist def inherit-input-method))) |
| 266 | (and def (string-equal input "") (setq input def)) | 266 | (when (and def (string-equal input "")) |
| 267 | (setq input (if (consp def) (car def) def))) | ||
| 267 | ;; Remove empty strings in the list of read strings. | 268 | ;; Remove empty strings in the list of read strings. |
| 268 | (split-string input crm-separator t))) | 269 | (split-string input crm-separator t))) |
| 269 | (remove-hook 'choose-completion-string-functions | 270 | (remove-hook 'choose-completion-string-functions |