diff options
| author | Richard M. Stallman | 1997-06-19 02:49:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-19 02:49:41 +0000 |
| commit | 0094907bfa2f03b4a6766c92029a1a24b132ee7e (patch) | |
| tree | f986d574f9de9d29fa2badb4150df0517a5f7ef5 | |
| parent | b39697d1df269707336e5274bf5a99b2dc82476b (diff) | |
| download | emacs-0094907bfa2f03b4a6766c92029a1a24b132ee7e.tar.gz emacs-0094907bfa2f03b4a6766c92029a1a24b132ee7e.zip | |
(complete-symbol): New function.
(complete-tag): Definition deleted.
(esc-map): Bind M-TAB to compete-symbol.
| -rw-r--r-- | lisp/bindings.el | 17 |
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'.") | |||
| 215 | 215 | ||
| 216 | (make-variable-buffer-local 'indent-tabs-mode) | 216 | (make-variable-buffer-local 'indent-tabs-mode) |
| 217 | 217 | ||
| 218 | ;; This is here to avoid autoloading etags on M-TAB. | 218 | (define-key esc-map "\t" 'complete-symbol) |
| 219 | ;; M-x visit-tags-table will autoload etags, which will redefine complete-tag. | 219 | |
| 220 | (defun complete-tag () | 220 | (defun complete-symbol () |
| 221 | "Perform tags completion on the text around point. | 221 | "Perform tags completion on the text around point. |
| 222 | Completes to the set of names listed in the current tags table. | 222 | Completes to the set of names listed in the current tags table. |
| 223 | The string to complete is chosen in the same way as the default | 223 | The string to complete is chosen in the same way as the default |
| 224 | for \\[find-tag] (which see)." | 224 | for \\[find-tag] (which see)." |
| 225 | (interactive) | 225 | (interactive "P") |
| 226 | (error (substitute-command-keys | 226 | (if arg |
| 227 | "No tags table loaded. Try \\[visit-tags-table]."))) | 227 | (if (fboundp 'complete-tag) |
| 228 | (complete-tag) | ||
| 229 | ;; Don't autoload etags if we have no tags table. | ||
| 230 | (error (substitute-command-keys | ||
| 231 | "No tags table loaded; use \\[visit-tags-table] to load one"))) | ||
| 232 | (info-complete-symbol))) | ||
| 228 | 233 | ||
| 229 | ;; Reduce total amount of space we must allocate during this function | 234 | ;; Reduce total amount of space we must allocate during this function |
| 230 | ;; that we will not need to keep permanently. | 235 | ;; that we will not need to keep permanently. |