summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-02-06 00:37:23 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2014-02-06 00:37:23 -0500
commit29127376a56c805d846de564c3c3ece23e263b8f (patch)
treea66e499b1628b732fe497787d1cfd2d7dab84789 /lisp/emacs-lisp/lisp.el
parent314ffdb1d7dfe361462be949ae953334e1aa5977 (diff)
downloademacs-29127376a56c805d846de564c3c3ece23e263b8f.tar.gz
* 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
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r--lisp/emacs-lisp/lisp.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 716df8a4cca..58780bfc657 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -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