From: Dmitry Gutov Date: Mon, 8 Jun 2015 22:08:01 +0000 (+0300) Subject: Skip past `#' to find BEG X-Git-Tag: emacs-25.0.90~1821 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68273707ecbca6ff6d34071c04c2b395384c41e5;p=emacs.git 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. --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index e12d1331601..9494e97fa73 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -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 diff --git a/test/automated/elisp-mode-tests.el b/test/automated/elisp-mode-tests.el index 7af6dfcdc03..85f6da22441 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/automated/elisp-mode-tests.el @@ -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)