[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument:
From: |
Nicolas Richard |
Subject: |
bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil" |
Date: |
Tue, 04 Mar 2014 16:03:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Bastien <bzg@altern.org> writes:
> Leo Liu <sdl.web@gmail.com> writes:
>> I noticed this error too. (base-size (cdr last)) is used in 24.3 and no
>> errors there. So it will be good to know where the problem originated
>> and fix it.
> The commit makes `base-size' optional, so we need to ensure it
> falls back to 0 instead of nil.
Shouldn't base-size default to 0 in completion-hilit-commonality then,
to avoid having to fix code that relies on base-size being an integer
everywhere else ? Or were all such occurrences found already ?
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1595,11 +1595,12 @@ This adds the face `completions-common-part' to the
first
`completions-first-difference' to the first character after that.
It returns a list with font-lock properties applied to each element,
-and with BASE-SIZE appended as the last element."
+and with BASE-SIZE (or zero) appended as the last element."
+ (or base-size (setq base-size 0))
(when completions
(if (zerop prefix-len)
completions
- (let ((com-str-len (- prefix-len (or base-size 0))))
+ (let ((com-str-len (- prefix-len base-size)))
(nconc
(mapcar
(lambda (elem)
--
Nico.
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Nicolas Richard, 2014/03/04
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Leo Liu, 2014/03/04
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Bastien, 2014/03/04
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Glenn Morris, 2014/03/04
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Bastien, 2014/03/04
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Leo Liu, 2014/03/04
- bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil", Bastien, 2014/03/05