emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6827370: Skip past `#' to find BEG


From: Dmitry Gutov
Subject: [Emacs-diffs] master 6827370: Skip past `#' to find BEG
Date: Mon, 08 Jun 2015 22:08:46 +0000

branch: master
commit 68273707ecbca6ff6d34071c04c2b395384c41e5
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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.
---
 lisp/progmodes/elisp-mode.el       |    2 +-
 test/automated/elisp-mode-tests.el |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index e12d133..9494e97 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 7af6dfc..85f6da2 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]