Skip past `#' to find BEG
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Skip past `#' to find BEG (bug#20771). * test/automated/elisp-mode-tests.el (elisp-completes-functions-after-hash-quote): New test.
This commit is contained in:
parent
55200b4ca5
commit
68273707ec
2 changed files with 10 additions and 1 deletions
|
@ -460,7 +460,7 @@ It can be quoted, or be inside a quoted form."
|
|||
(beg (condition-case nil
|
||||
(save-excursion
|
||||
(backward-sexp 1)
|
||||
(skip-chars-forward "`',‘")
|
||||
(skip-chars-forward "`',‘#")
|
||||
(point))
|
||||
(scan-error pos)))
|
||||
(end
|
||||
|
|
|
@ -78,6 +78,15 @@
|
|||
(should (member "backup-buffer" comps))
|
||||
(should-not (member "backup-inhibited" comps))))))
|
||||
|
||||
(ert-deftest elisp-completes-functions-after-hash-quote ()
|
||||
(ert-deftest elisp-completes-functions-after-let-bindings ()
|
||||
(with-temp-buffer
|
||||
(emacs-lisp-mode)
|
||||
(insert "#'ba")
|
||||
(let ((comps (elisp--test-completions)))
|
||||
(should (member "backup-buffer" comps))
|
||||
(should-not (member "backup-inhibited" comps))))))
|
||||
|
||||
(ert-deftest elisp-completes-local-variables ()
|
||||
(with-temp-buffer
|
||||
(emacs-lisp-mode)
|
||||
|
|
Loading…
Add table
Reference in a new issue