From d478606111f9779a8745c3982e65acfb2cc50315 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 14 Aug 2008 23:44:14 +0000 Subject: [PATCH] (lisp-complete-symbol): Supply match-size to display-completion-list. --- lisp/emacs-lisp/lisp.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index da1b53cc06e..80bffb33638 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -687,18 +687,19 @@ considered." (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))) -- 2.39.2