From: Stefan Monnier Date: Thu, 6 Feb 2014 05:37:23 +0000 (-0500) Subject: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~151 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29127376a56c805d846de564c3c3ece23e263b8f;p=emacs.git * 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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1a1a7031b8c..7e37e363786 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,11 +1,17 @@ +2014-02-06 Stefan Monnier + + * emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start + with a space (bug#16664). Limit the symbols considered to the ones + that are bound or fbound (bug#16646). + 2014-02-06 Glenn Morris * epa.el (epa-mail-aliases): Doc fix. 2014-02-06 Dmitry Gutov - * emacs-lisp/lisp.el (lisp-completion-at-point): Use - `completion-table-merge' instead of `completion-table-in-turn' + * emacs-lisp/lisp.el (lisp-completion-at-point): + Use `completion-table-merge' instead of `completion-table-in-turn' (bug#16604). * minibuffer.el (completion-table-merge): New function. 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)) " ")) :company-doc-buffer #'lisp--company-doc-buffer