1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start

with a space.  Limit the symbols considered to the ones
that are bound or fbound (bug#16646).

Fixes: debbugs:16664
This commit is contained in:
Stefan Monnier 2014-02-06 00:37:23 -05:00
parent 314ffdb1d7
commit 29127376a5
2 changed files with 19 additions and 4 deletions

View file

@ -815,7 +815,8 @@ considered."
(scan-error pos)))
(end
(unless (or (eq beg (point-max))
(member (char-syntax (char-after beg)) '(?\" ?\( ?\))))
(member (char-syntax (char-after beg))
'(?\s ?\" ?\( ?\))))
(condition-case nil
(save-excursion
(goto-char beg)
@ -832,7 +833,15 @@ considered."
;; the macro/function being called.
(list nil (completion-table-merge
lisp--local-variables-completion-table
obarray) ;Could be anything.
(apply-partially #'completion-table-with-predicate
obarray
;; Don't include all symbols
;; (bug#16646).
(lambda (sym)
(or (boundp sym)
(fboundp sym)
(symbol-plist sym)))
'strict))
:annotation-function
(lambda (str) (if (fboundp (intern-soft str)) " <f>"))
:company-doc-buffer #'lisp--company-doc-buffer