comparison lisp/emacs-lisp/lisp.el @ 97474:b7077a582a3d

(lisp-complete-symbol): Supply match-size to display-completion-list.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 14 Aug 2008 23:44:14 +0000
parents 02fedff190ed
children bcaacb72ee0e
comparison
equal deleted inserted replaced
97473:dbb95d0d31c2 97474:b7077a582a3d
685 (eq (minibuffer-window) (selected-window)))) 685 (eq (minibuffer-window) (selected-window))))
686 (unless minibuf-is-in-use 686 (unless minibuf-is-in-use
687 (message "Making completion list...")) 687 (message "Making completion list..."))
688 (let ((list (all-completions pattern obarray predicate))) 688 (let ((list (all-completions pattern obarray predicate)))
689 (setq list (sort list 'string<)) 689 (setq list (sort list 'string<))
690 (or (eq predicate 'fboundp) 690 (unless (eq predicate 'fboundp)
691 (let (new) 691 (let (new)
692 (while list 692 (dolist (compl list)
693 (setq new (cons (if (fboundp (intern (car list))) 693 (push (if (fboundp (intern compl))
694 (list (car list) " <f>") 694 (list compl " <f>")
695 (car list)) 695 compl)
696 new)) 696 new))
697 (setq list (cdr list))) 697 (setq list (nreverse new))))
698 (setq list (nreverse new))))
699 (if (> (length list) 1) 698 (if (> (length list) 1)
700 (with-output-to-temp-buffer "*Completions*" 699 (with-output-to-temp-buffer "*Completions*"
701 (display-completion-list list pattern)) 700 (display-completion-list
701 list pattern
702 (- beg (field-beginning))))
702 ;; Don't leave around a completions buffer that's 703 ;; Don't leave around a completions buffer that's
703 ;; out of date. 704 ;; out of date.
704 (let ((win (get-buffer-window "*Completions*" 0))) 705 (let ((win (get-buffer-window "*Completions*" 0)))
705 (if win (with-selected-window win (bury-buffer)))))) 706 (if win (with-selected-window win (bury-buffer))))))
706 (unless minibuf-is-in-use 707 (unless minibuf-is-in-use