emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 632847e 1/2: Set default base-size in minibuffer-co


From: Stephen Leake
Subject: [Emacs-diffs] master 632847e 1/2: Set default base-size in minibuffer-completion-help
Date: Thu, 01 Oct 2015 14:34:25 +0000

branch: master
commit 632847e07c9dbe4ef2d1defd332254f1298ea912
Author: Stephen Leake <address@hidden>
Commit: Stephen Leake <address@hidden>

    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.
---
 lisp/minibuffer.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 689911c..2814d02 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1374,7 +1374,7 @@ appear to be a match."
                      ;; that file.
                      (= (length string) (length compl)))
             (completion--replace beg end compl))))
-    (funcall exit-function))
+      (funcall exit-function))
 
      ((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
       ;; The user is permitted to exit with an input that's rejected
@@ -1391,7 +1391,7 @@ appear to be a match."
 
      (t
       ;; Call do-completion, but ignore errors.
-    (funcall completion-function))))
+      (funcall completion-function))))
 
 (defun completion--try-word-completion (string table predicate point md)
   (let ((comp (completion-try-completion string table predicate point md)))
@@ -1794,7 +1794,7 @@ variables.")
            (if completions "Sole completion" "No completions")))
 
       (let* ((last (last completions))
-             (base-size (cdr last))
+             (base-size (or (cdr last) 0))
              (prefix (unless (zerop base-size) (substring string 0 base-size)))
              (all-md (completion--metadata (buffer-substring-no-properties
                                             start (point))



reply via email to

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