diff options
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 13 | ||||
| -rw-r--r-- | test/automated/elisp-mode-tests.el | 9 |
2 files changed, 16 insertions, 6 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 7c9a2d7c422..18da0762c96 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -544,12 +544,13 @@ It can be quoted, or be inside a quoted form." | |||
| 544 | (< (point) beg))))) | 544 | (< (point) beg))))) |
| 545 | (list t obarray | 545 | (list t obarray |
| 546 | :predicate (lambda (sym) (get sym 'error-conditions)))) | 546 | :predicate (lambda (sym) (get sym 'error-conditions)))) |
| 547 | ((and ?\( | 547 | ((or `let `let* |
| 548 | (guard (save-excursion | 548 | (and ?\( |
| 549 | (goto-char (1- beg)) | 549 | (guard (save-excursion |
| 550 | (up-list -1) | 550 | (goto-char (1- beg)) |
| 551 | (forward-symbol -1) | 551 | (up-list -1) |
| 552 | (looking-at "\\_<let\\*?\\_>")))) | 552 | (forward-symbol -1) |
| 553 | (looking-at "\\_<let\\*?\\_>"))))) | ||
| 553 | (list t obarray | 554 | (list t obarray |
| 554 | :predicate #'boundp | 555 | :predicate #'boundp |
| 555 | :company-doc-buffer #'elisp--company-doc-buffer | 556 | :company-doc-buffer #'elisp--company-doc-buffer |
diff --git a/test/automated/elisp-mode-tests.el b/test/automated/elisp-mode-tests.el index a4148e9e5ff..26f903dbd0c 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/automated/elisp-mode-tests.el | |||
| @@ -84,5 +84,14 @@ | |||
| 84 | (should (member "bar" comps)) | 84 | (should (member "bar" comps)) |
| 85 | (should (member "baz" comps))))) | 85 | (should (member "baz" comps))))) |
| 86 | 86 | ||
| 87 | (ert-deftest completest-variables-in-let-bindings () | ||
| 88 | (dolist (text '("(let (ba" "(let* ((ba")) | ||
| 89 | (with-temp-buffer | ||
| 90 | (emacs-lisp-mode) | ||
| 91 | (insert text) | ||
| 92 | (let ((comps (elisp--test-completions))) | ||
| 93 | (should (member "backup-inhibited" comps)) | ||
| 94 | (should-not (member "backup-buffer" comps)))))) | ||
| 95 | |||
| 87 | (provide 'elisp-mode-tests) | 96 | (provide 'elisp-mode-tests) |
| 88 | ;;; elisp-mode-tests.el ends here | 97 | ;;; elisp-mode-tests.el ends here |