1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 01:41:01 -08:00

Make sure we're inside the let bindings

* lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
Make sure we're inside the let bindings.

* test/automated/elisp-mode-tests.el
(elisp-completes-functions-after-let-bindings): New test.
This commit is contained in:
Dmitry Gutov 2015-05-05 04:54:01 +03:00
parent 201f91e5ad
commit 46c94cd599
2 changed files with 16 additions and 8 deletions

View file

@ -544,13 +544,13 @@ It can be quoted, or be inside a quoted form."
(< (point) beg)))))
(list t obarray
:predicate (lambda (sym) (get sym 'error-conditions))))
((or `let `let*
(and ?\(
(guard (save-excursion
(goto-char (1- beg))
(up-list -1)
(forward-symbol -1)
(looking-at "\\_<let\\*?\\_>")))))
((and (or ?\( `let `let*)
(guard (save-excursion
(goto-char (1- beg))
(when (eq parent ?\()
(up-list -1))
(forward-symbol -1)
(looking-at "\\_<let\\*?\\_>"))))
(list t obarray
:predicate #'boundp
:company-doc-buffer #'elisp--company-doc-buffer