unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil"
@ 2014-03-04 14:12 Nicolas Richard
  2014-03-04 14:27 ` Leo Liu
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Richard @ 2014-03-04 14:12 UTC (permalink / raw)
  To: 16935

Hi,

Reproduce:
emacs -Q -f toggle-debug-on-error --eval '(execute-kbd-macro (kbd "M-x f o o C-a <tab>"))'

backtrace:
Debugger entered--Lisp error: (wrong-type-argument numberp nil)
  zerop(nil)
  minibuffer-completion-help(5 8)
[the rest is of no particular interest]

Possible fix (i.e. Work© Fo® Me™):

--- 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))


-- 
Nico.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-05  7:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 14:12 bug#16935: 24.3.50; when tab-completing in 'M-x' : "Wrong type argument: numberp, nil" Nicolas Richard
2014-03-04 14:27 ` Leo Liu
2014-03-04 14:39   ` Bastien
2014-03-04 15:03     ` Nicolas Richard
2014-03-04 15:13       ` Bastien
2014-03-04 17:03     ` Glenn Morris
2014-03-04 17:21       ` Bastien
2014-03-05  0:15       ` Leo Liu
2014-03-05  7:08         ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).