]> git.eshelyaron.com Git - emacs.git/commitdiff
* minibuffer.el (tags-completion-at-point-function): Fix return value.
authorChong Yidong <cyd@stupidchicken.com>
Fri, 30 Apr 2010 23:13:22 +0000 (19:13 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 30 Apr 2010 23:13:22 +0000 (19:13 -0400)
lisp/ChangeLog
lisp/minibuffer.el

index ddc0fb8e23972c8dc62e737c6e1518cf40a578d4..ec929a7c58db3b690a889fd36662a0558bb87684 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-30  Chong Yidong  <cyd@stupidchicken.com>
+
+       * minibuffer.el (tags-completion-at-point-function): Fix return
+       value.
+
 2010-04-30  Eli Zaretskii  <eliz@gnu.org>
 
        * composite.el (compose-region, reference-point-alist): Fix typos
index 80e5f0ad10f8a559ca95bdaaee7a267206b57ab5..be9b9a524fe9be80166f7cad6e734c1fc53ef1be 100644 (file)
@@ -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.