comparison lisp/bindings.el @ 18325:65986b1a2cd6

(complete-symbol): New function. (complete-tag): Definition deleted. (esc-map): Bind M-TAB to compete-symbol.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 Jun 1997 02:49:41 +0000
parents 8d8d4aa12426
children 327eba076416
comparison
equal deleted inserted replaced
18324:e28140c58ed8 18325:65986b1a2cd6
213 "^no next record$")) 213 "^no next record$"))
214 214
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.
231 (garbage-collect) 236 (garbage-collect)
232 237