bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Bastien
Subject: bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil"
Date: Tue, 04 Mar 2014 15:39:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Leo Liu <address@hidden> writes:

> On 2014-03-04 22:12 +0800, Nicolas Richard wrote:
>> --- a/lisp/minibuffer.el
>> +++ b/lisp/minibuffer.el
>> @@ -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))
>
> 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.

Sorry -- I just saw Nicolas email and yours.  Hopefully, I came up
with the same fix.

The error originated here:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=66c5fecc

The commit makes `base-size' optional, so we need to ensure it
falls back to 0 instead of nil.

-- 
 Bastien





reply via email to

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