# HG changeset patch # User Richard M. Stallman # Date 866688581 0 # Node ID 65986b1a2cd6f1f5a7143b4a4715b1da8b5a58fb # Parent e28140c58ed8f56204556623f8788b04831879f7 (complete-symbol): New function. (complete-tag): Definition deleted. (esc-map): Bind M-TAB to compete-symbol. diff -r e28140c58ed8 -r 65986b1a2cd6 lisp/bindings.el --- a/lisp/bindings.el Thu Jun 19 02:47:38 1997 +0000 +++ b/lisp/bindings.el Thu Jun 19 02:49:41 1997 +0000 @@ -215,16 +215,21 @@ (make-variable-buffer-local 'indent-tabs-mode) -;; This is here to avoid autoloading etags on M-TAB. -;; M-x visit-tags-table will autoload etags, which will redefine complete-tag. -(defun complete-tag () +(define-key esc-map "\t" 'complete-symbol) + +(defun complete-symbol () "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) - (error (substitute-command-keys - "No tags table loaded. Try \\[visit-tags-table]."))) + (interactive "P") + (if arg + (if (fboundp 'complete-tag) + (complete-tag) + ;; Don't autoload etags if we have no tags table. + (error (substitute-command-keys + "No tags table loaded; use \\[visit-tags-table] to load one"))) + (info-complete-symbol))) ;; Reduce total amount of space we must allocate during this function ;; that we will not need to keep permanently.