summaryrefslogtreecommitdiff
path: root/lisp/bindings.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-06-19 02:49:41 +0000
committerRichard M. Stallman <rms@gnu.org>1997-06-19 02:49:41 +0000
commit0094907bfa2f03b4a6766c92029a1a24b132ee7e (patch)
treef986d574f9de9d29fa2badb4150df0517a5f7ef5 /lisp/bindings.el
parentb39697d1df269707336e5274bf5a99b2dc82476b (diff)
downloademacs-0094907bfa2f03b4a6766c92029a1a24b132ee7e.tar.gz
(complete-symbol): New function.
(complete-tag): Definition deleted. (esc-map): Bind M-TAB to compete-symbol.
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r--lisp/bindings.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 9e9193ae58e..55e46ecee83 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -215,16 +215,21 @@ is okay. See `mode-line-format'.")
(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.