(lispref.info)Lisp Symbol Completion


Prev: Reading File Names Up: Completion

Lisp Symbol Completion
----------------------

   If you type a part of a symbol, and then type `M-TAB'
(`lisp-complete-symbol'), this command attempts to fill in as much more
of the symbol name as it can.  Not only does this save typing, but it
can help you with the name of a symbol that you have partially
forgotten.

 - Command: lisp-complete-symbol
     This function performs completion on the symbol name preceding
     point.  The name is completed against the symbols in the global
     variable `obarray', and characters from the completion are
     inserted into the buffer, making the name longer.  If there is
     more than one completion, a list of all possible completions is
     placed in the `*Help*' buffer.  The bell rings if there is no
     possible completion in `obarray'.

     If an open parenthesis immediately precedes the name, only symbols
     with function definitions are considered.  (By reducing the number
     of alternatives, this may succeed in completing more characters.)
     Otherwise, symbols with either a function definition, a value, or
     at least one property are considered.

     `lisp-complete-symbol' returns `t' if the symbol had an exact, and
     unique, match; otherwise, it returns `nil'.

     In the following example, the user has already inserted `(forwa'
     into the buffer `foo.el'.  The command `lisp-complete-symbol' then
     completes the name to `(forward-'.

          ---------- Buffer: foo.el ----------
          (forwa-!-
          ---------- Buffer: foo.el ----------

          (lisp-complete-symbol)
               => nil

          ---------- Buffer: foo.el ----------
          (forward--!-
          ---------- Buffer: foo.el ----------


automatically generated by info2www