# HG changeset patch # User Chong Yidong # Date 1272669202 14400 # Node ID 0f3897ef1f44b292d00032ba1a65f511e4f6386d # Parent 35378c29749db2b553cfa29cf5b42d072e7cd83c * minibuffer.el (tags-completion-at-point-function): Fix return value. diff -r 35378c29749d -r 0f3897ef1f44 lisp/ChangeLog --- a/lisp/ChangeLog Fri Apr 30 13:48:04 2010 -0700 +++ b/lisp/ChangeLog Fri Apr 30 19:13:22 2010 -0400 @@ -1,3 +1,8 @@ +2010-04-30 Chong Yidong + + * minibuffer.el (tags-completion-at-point-function): Fix return + value. + 2010-04-30 Eli Zaretskii * composite.el (compose-region, reference-point-alist): Fix typos diff -r 35378c29749d -r 0f3897ef1f44 lisp/minibuffer.el --- a/lisp/minibuffer.el Fri Apr 30 13:48:04 2010 -0700 +++ b/lisp/minibuffer.el Fri Apr 30 19:13:22 2010 -0400 @@ -1169,6 +1169,7 @@ `: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 @@ 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.