Function: tags-completion-at-point-function
tags-completion-at-point-function is a byte-compiled function defined
in etags.el.gz.
Signature
(tags-completion-at-point-function)
Documentation
Using tags, return a completion table for the text around point.
If no tags table is loaded, do nothing and return nil.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/etags.el.gz
;;;###autoload (defun tags-completion-at-point-function ()
;;;###autoload (if (or tags-table-list tags-file-name)
;;;###autoload (progn
;;;###autoload (load "etags")
;;;###autoload (tags-completion-at-point-function))))
(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."
(when (or tags-table-list tags-file-name)
(let ((completion-ignore-case (find-tag--completion-ignore-case))
(pattern (find-tag--default))
beg)
(when pattern
(save-excursion
;; Avoid end-of-buffer error.
(goto-char (+ (point) (length pattern) -1))
;; The find-tag function might be overly optimistic.
(when (search-backward pattern nil t)
(setq beg (point))
(forward-char (length pattern))
(list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))))