+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
`: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."
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.