]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug#18265
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 19 Sep 2014 03:41:42 +0000 (07:41 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 19 Sep 2014 03:41:42 +0000 (07:41 +0400)
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
(lisp-completion-at-point): Move `end' back if it's after quote.
If in comment or string, only complete when after backquote.

lisp/ChangeLog
lisp/emacs-lisp/lisp.el

index 777322dc82c66dffe77acc76029b5ac96339c388..997071f2dc8ba1786ea3d5bdd0b1df10ca17d382 100644 (file)
@@ -2,6 +2,9 @@
 
        * emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
        `table-etc' when `end' is non-nil.
+       (lisp-completion-at-point): Move `end' back if it's after quote.
+       If in comment or string, only complete when after backquote.
+       (Bug#18265)
 
 2014-09-19  Dmitry Gutov  <dgutov@yandex.ru>
 
index 581e9b9504b764a07a323a6f437d167924116954..a8bad47a90a3b9ee3739fe9b84abf89a46e4045f 100644 (file)
@@ -957,12 +957,14 @@ It can be quoted, or be inside a quoted form."
                  (save-excursion
                    (goto-char beg)
                    (forward-sexp 1)
+                    (skip-chars-backward "'")
                    (when (>= (point) pos)
                      (point)))
                (scan-error pos))))
            ;; t if in function position.
            (funpos (eq (char-before beg) ?\()))
-      (when end
+      (when (and end (or (not (nth 8 (syntax-ppss)))
+                         (eq (char-before beg) ?`)))
         (let ((table-etc
                (if (not funpos)
                    ;; FIXME: We could look at the first element of the list and