From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: 30072@debbugs.gnu.org
Subject: bug#30072: 27.0.50; completing-read-multiple chokes on list of default values
Date: Wed, 11 Apr 2018 12:36:07 +0100 [thread overview]
Message-ID: <878t9uf00o.fsf@tcd.ie> (raw)
In-Reply-To: <878td5pf80.fsf@gmail.com> (Basil L. Contovounesios's message of "Wed, 10 Jan 2018 21:37:51 +0000")
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Support-list-of-default-values-in-completing-read-mu.patch --]
[-- Type: text/x-diff, Size: 1131 bytes --]
From 7a33c02e2815e0a9625ffc48f3850894522169b6 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Wed, 10 Jan 2018 20:21:25 +0000
Subject: [PATCH] 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 5aa856f467..1a67494d3c 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -263,7 +263,8 @@ completing-read-multiple
(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
--
2.16.3
[-- Attachment #2: Type: text/plain, Size: 193 bytes --]
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> I attach a fix which follows the implementation of
> completing-read-default.
Updated to include bug ticket number.
Thanks,
--
Basil
next prev parent reply other threads:[~2018-04-11 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 21:37 bug#30072: 27.0.50; completing-read-multiple chokes on list of default values Basil L. Contovounesios
2018-04-11 11:36 ` Basil L. Contovounesios [this message]
2018-04-12 20:37 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878t9uf00o.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=30072@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.