GNU Info

Info Node: (emacs-lisp-intro.info)Interactive

(emacs-lisp-intro.info)Interactive


Next: Interactive Options Prev: Install Up: Writing Defuns
Enter node , (file) or (file)node

Make a Function Interactive
===========================

   You make a function interactive by placing a list that begins with
the special form `interactive' immediately after the documentation.  A
user can invoke an interactive function by typing `M-x' and then the
name of the function; or by typing the keys to which it is bound, for
example, by typing `C-n' for `next-line' or `C-x h' for
`mark-whole-buffer'.

   Interestingly, when you call an interactive function interactively,
the value returned is not automatically displayed in the echo area.
This is because you often call an interactive function for its side
effects, such as moving forward by a word or line, and not for the
value returned.  If the returned value were displayed in the echo area
each time you typed a key, it would be very distracting.

Interactive multiply-by-seven
An overview.
multiply-by-seven in detail
The interactive version.

automatically generated by info2www version 1.2.2.9