diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-04-30 19:13:22 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-04-30 19:13:22 -0400 |
commit | 27601456d7c2a72b59cc9d4927e86627257d2f46 (patch) | |
tree | 4b8b67d47650bd78cda4f3405256f07bac7452b2 /lisp/minibuffer.el | |
parent | afc619439b92209bc437b7764cdf1482784642ab (diff) | |
download | emacs-27601456d7c2a72b59cc9d4927e86627257d2f46.tar.gz |
* minibuffer.el (tags-completion-at-point-function): Fix return value.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 80e5f0ad10f..be9b9a524fe 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1169,6 +1169,7 @@ Currently supported properties are: `:predicate' a predicate that completion candidates need to satisfy. `:annotation-function' the value to use for `completion-annotate-function'.") +(declare-function tags-lazy-completion-table "etags.el" ()) (defun tags-completion-at-point-function () "Using tags, return a completion table for the text around point. If no tags table is loaded, do nothing and return nil." @@ -1180,11 +1181,14 @@ If no tags table is loaded, do nothing and return nil." case-fold-search)) (pattern (funcall (or find-tag-default-function (get major-mode 'find-tag-default-function) - 'find-tag-default)))) + 'find-tag-default))) + beg) (when pattern - (tags-lazy-completion-table))))) - -(declare-function tags-lazy-completion-table "etags.el" ()) + (save-excursion + (search-backward pattern) + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table))))))) (defun complete-symbol (&optional arg) "Perform completion on the text around point. |