aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/crm.el41
2 files changed, 27 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4b3f30e9692..2b8c53c3378 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-05-09 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs-lisp/crm.el (completing-read-multiple): Properly handle
4 return value of read-from-minibuffer for empty input.
5
12006-05-09 Miles Bader <miles@gnu.org> 62006-05-09 Miles Bader <miles@gnu.org>
2 7
3 * comint.el (comint-insert-input): Remove redundant calls to setq 8 * comint.el (comint-insert-input): Remove redundant calls to setq
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 5a9787b5ca8..11d4d7fb2ba 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -592,25 +592,28 @@ The return value of this function is a list of the read strings.
592See the documentation for `completing-read' for details on the arguments: 592See the documentation for `completing-read' for details on the arguments:
593PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and 593PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and
594INHERIT-INPUT-METHOD." 594INHERIT-INPUT-METHOD."
595 (let ((minibuffer-completion-table (function crm-collection-fn)) 595 (let* ((minibuffer-completion-table (function crm-collection-fn))
596 (minibuffer-completion-predicate predicate) 596 (minibuffer-completion-predicate predicate)
597 ;; see completing_read in src/minibuf.c 597 ;; see completing_read in src/minibuf.c
598 (minibuffer-completion-confirm 598 (minibuffer-completion-confirm
599 (unless (eq require-match t) require-match)) 599 (unless (eq require-match t) require-match))
600 (crm-completion-table table) 600 (crm-completion-table table)
601 crm-last-exact-completion 601 crm-last-exact-completion
602 crm-current-element 602 crm-current-element
603 crm-left-of-element 603 crm-left-of-element
604 crm-right-of-element 604 crm-right-of-element
605 crm-beginning-of-element 605 crm-beginning-of-element
606 crm-end-of-element 606 crm-end-of-element
607 (map (if require-match 607 (map (if require-match
608 crm-local-must-match-map 608 crm-local-must-match-map
609 crm-local-completion-map))) 609 crm-local-completion-map))
610 (split-string (read-from-minibuffer 610 ;; If the user enters empty input, read-from-minibuffer returns
611 prompt initial-input map 611 ;; the empty string, not DEF.
612 nil hist def inherit-input-method) 612 (input (read-from-minibuffer
613 crm-separator))) 613 prompt initial-input map
614 nil hist def inherit-input-method)))
615 (and def (string-equal input "") (setq input def))
616 (split-string input crm-separator)))
614 617
615;; testing and debugging 618;; testing and debugging
616;; (defun crm-init-test-environ () 619;; (defun crm-init-test-environ ()