minibuffer.el (minibuffer-completion-help): Use 0 as thefallback value for `base...
authorBastien Guerry <bzg@gnu.org>
Tue, 4 Mar 2014 14:33:56 +0000 (15:33 +0100)
committerBastien Guerry <bzg@gnu.org>
Tue, 4 Mar 2014 14:33:56 +0000 (15:33 +0100)
* minibuffer.el (minibuffer-completion-help): Use 0 as the
fallback value for `base-size'.  (Bug#16933)

lisp/ChangeLog
lisp/minibuffer.el

index e361990..fe40615 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-04  Bastien Guerry  <bzg@gnu.org>
+
+       * minibuffer.el (minibuffer-completion-help): Use 0 as the
+       fallback value for `base-size'.  (Bug#16933)
+
 2014-03-04  Juanma Barranquero  <lekktu@gmail.com>
 
        * hexl.el (hexl-address-region, hexl-ascii-region)
index 63e7e14..da3a8ad 100644 (file)
@@ -1753,7 +1753,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))