aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Leake2015-10-01 09:14:23 -0500
committerStephen Leake2015-10-01 09:33:59 -0500
commit632847e07c9dbe4ef2d1defd332254f1298ea912 (patch)
tree113b50eddab5231a26579993c14b73855ce4305a
parent9c86325b69d75e9b17ff468f5a2220597979635f (diff)
downloademacs-632847e07c9dbe4ef2d1defd332254f1298ea912.tar.gz
emacs-632847e07c9dbe4ef2d1defd332254f1298ea912.zip
Set default base-size in minibuffer-completion-help
* lisp/minibuffer.el (minibuffer-completion-help): Set default base-size, in case completion table does not set it.
-rw-r--r--lisp/minibuffer.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 689911c405a..2814d020b8d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1374,7 +1374,7 @@ appear to be a match."
1374 ;; that file. 1374 ;; that file.
1375 (= (length string) (length compl))) 1375 (= (length string) (length compl)))
1376 (completion--replace beg end compl)))) 1376 (completion--replace beg end compl))))
1377 (funcall exit-function)) 1377 (funcall exit-function))
1378 1378
1379 ((memq minibuffer-completion-confirm '(confirm confirm-after-completion)) 1379 ((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
1380 ;; The user is permitted to exit with an input that's rejected 1380 ;; The user is permitted to exit with an input that's rejected
@@ -1391,7 +1391,7 @@ appear to be a match."
1391 1391
1392 (t 1392 (t
1393 ;; Call do-completion, but ignore errors. 1393 ;; Call do-completion, but ignore errors.
1394 (funcall completion-function)))) 1394 (funcall completion-function))))
1395 1395
1396(defun completion--try-word-completion (string table predicate point md) 1396(defun completion--try-word-completion (string table predicate point md)
1397 (let ((comp (completion-try-completion string table predicate point md))) 1397 (let ((comp (completion-try-completion string table predicate point md)))
@@ -1794,7 +1794,7 @@ variables.")
1794 (if completions "Sole completion" "No completions"))) 1794 (if completions "Sole completion" "No completions")))
1795 1795
1796 (let* ((last (last completions)) 1796 (let* ((last (last completions))
1797 (base-size (cdr last)) 1797 (base-size (or (cdr last) 0))
1798 (prefix (unless (zerop base-size) (substring string 0 base-size))) 1798 (prefix (unless (zerop base-size) (substring string 0 base-size)))
1799 (all-md (completion--metadata (buffer-substring-no-properties 1799 (all-md (completion--metadata (buffer-substring-no-properties
1800 start (point)) 1800 start (point))