diff options
| author | Dmitry Gutov | 2014-09-19 07:41:42 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2014-09-19 07:41:42 +0400 |
| commit | 3907574bb864de9a9020af11c30ec0b48588fc13 (patch) | |
| tree | 0b88f52cdce46a90614b218349f522f9b6ba6f38 | |
| parent | 30c17da5df63c49ac3f4d7fdf1a0d668d02516e3 (diff) | |
| download | emacs-3907574bb864de9a9020af11c30ec0b48588fc13.tar.gz emacs-3907574bb864de9a9020af11c30ec0b48588fc13.zip | |
Fix bug#18265
* 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.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 777322dc82c..997071f2dc8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -2,6 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | * emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate | 3 | * emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate |
| 4 | `table-etc' when `end' is non-nil. | 4 | `table-etc' when `end' is non-nil. |
| 5 | (lisp-completion-at-point): Move `end' back if it's after quote. | ||
| 6 | If in comment or string, only complete when after backquote. | ||
| 7 | (Bug#18265) | ||
| 5 | 8 | ||
| 6 | 2014-09-19 Dmitry Gutov <dgutov@yandex.ru> | 9 | 2014-09-19 Dmitry Gutov <dgutov@yandex.ru> |
| 7 | 10 | ||
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 581e9b9504b..a8bad47a90a 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -957,12 +957,14 @@ It can be quoted, or be inside a quoted form." | |||
| 957 | (save-excursion | 957 | (save-excursion |
| 958 | (goto-char beg) | 958 | (goto-char beg) |
| 959 | (forward-sexp 1) | 959 | (forward-sexp 1) |
| 960 | (skip-chars-backward "'") | ||
| 960 | (when (>= (point) pos) | 961 | (when (>= (point) pos) |
| 961 | (point))) | 962 | (point))) |
| 962 | (scan-error pos)))) | 963 | (scan-error pos)))) |
| 963 | ;; t if in function position. | 964 | ;; t if in function position. |
| 964 | (funpos (eq (char-before beg) ?\())) | 965 | (funpos (eq (char-before beg) ?\())) |
| 965 | (when end | 966 | (when (and end (or (not (nth 8 (syntax-ppss))) |
| 967 | (eq (char-before beg) ?`))) | ||
| 966 | (let ((table-etc | 968 | (let ((table-etc |
| 967 | (if (not funpos) | 969 | (if (not funpos) |
| 968 | ;; FIXME: We could look at the first element of the list and | 970 | ;; FIXME: We could look at the first element of the list and |