# HG changeset patch # User Chong Yidong # Date 1218757454 0 # Node ID b7077a582a3d3bed52fe8595d99b463ac4575443 # Parent dbb95d0d31c2a2040ba44ab6577b28614f41404a (lisp-complete-symbol): Supply match-size to display-completion-list. diff -r dbb95d0d31c2 -r b7077a582a3d lisp/emacs-lisp/lisp.el --- a/lisp/emacs-lisp/lisp.el Thu Aug 14 23:43:53 2008 +0000 +++ b/lisp/emacs-lisp/lisp.el Thu Aug 14 23:44:14 2008 +0000 @@ -687,18 +687,19 @@ (message "Making completion list...")) (let ((list (all-completions pattern obarray predicate))) (setq list (sort list 'string<)) - (or (eq predicate 'fboundp) - (let (new) - (while list - (setq new (cons (if (fboundp (intern (car list))) - (list (car list) " ") - (car list)) - new)) - (setq list (cdr list))) - (setq list (nreverse new)))) + (unless (eq predicate 'fboundp) + (let (new) + (dolist (compl list) + (push (if (fboundp (intern compl)) + (list compl " ") + compl) + new)) + (setq list (nreverse new)))) (if (> (length list) 1) (with-output-to-temp-buffer "*Completions*" - (display-completion-list list pattern)) + (display-completion-list + list pattern + (- beg (field-beginning)))) ;; Don't leave around a completions buffer that's ;; out of date. (let ((win (get-buffer-window "*Completions*" 0)))