Function: complete-tag

complete-tag is an autoloaded, interactive and byte-compiled function defined in etags.el.gz.

Signature

(complete-tag)

Documentation

Perform tags completion on the text around point.

Completes to the set of names listed in the current tags table. The string to complete is chosen in the same way as the default for M-x find-tag (find-tag) (which see).

Probably introduced at or before Emacs version 20.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/etags.el.gz
;;;###autoload
(defun complete-tag ()
  "Perform tags completion on the text around point.
Completes to the set of names listed in the current tags table.
The string to complete is chosen in the same way as the default
for \\[find-tag] (which see)."
  (interactive)
  (or tags-table-list
      tags-file-name
      (user-error "%s"
                  (substitute-command-keys
                   "No tags table loaded; try \\[visit-tags-table]")))
  (let ((comp-data (tags-completion-at-point-function))
        (completion-ignore-case (find-tag--completion-ignore-case)))
    (if (null comp-data)
	(user-error "Nothing to complete")
      (completion-in-region (car comp-data) (cadr comp-data)
			    (nth 2 comp-data)
			    (plist-get (nthcdr 3 comp-data) :predicate)))))