Next: , Previous: , Up: Programs   [Contents][Index]

26.8 Completion for Symbol Names

Completion is normally done in the minibuffer (see Completion), but you can also complete symbol names in ordinary Emacs buffers.

In programming language modes, type C-M-i or M-TAB to complete the partial symbol before point. On graphical displays, the M-TAB key is usually reserved by the window manager for switching graphical windows, so you should type C-M-i or ESC TAB instead.

In most programming language modes, C-M-i (or M-TAB) invokes the command completion-at-point, which generates its completion list in a flexible way. If Semantic mode is enabled, it tries to use the Semantic parser data for completion (see Semantic). If Semantic mode is not enabled or fails at performing completion, it tries to complete using the selected tags table (see Tags Tables). If in Emacs Lisp mode, it performs completion using the function, variable, or property names defined in the current Emacs session.

In all other respects, in-buffer symbol completion behaves like minibuffer completion. For instance, if Emacs cannot complete to a unique symbol, it displays a list of completion alternatives in another window. See Completion.

In Text mode and related modes, M-TAB completes words based on the spell-checker’s dictionary. See Spelling.