Avoid decode-char in top-level code
[bpt/emacs.git] / lispref / commands.texi
index cc8eb5f..343617c 100644 (file)
@@ -1,6 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998 Free Software Foundation, Inc. 
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+@c   Free Software Foundation, Inc. 
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/commands
 @node Command Loop, Keymaps, Minibuffers, Top
@@ -113,7 +114,8 @@ controls the reading of arguments for an interactive call.
 @subsection Using @code{interactive}
 
   This section describes how to write the @code{interactive} form that
-makes a Lisp function an interactively-callable command.
+makes a Lisp function an interactively-callable command, and how to
+examine a commands's @code{interactive} form.
 
 @defspec interactive arg-descriptor
 @cindex argument descriptors
@@ -209,12 +211,12 @@ give to that buffer:
 @end group
 @end smallexample
 
-@cindex @samp{*} in interactive
+@cindex @samp{*} in @code{interactive}
 @cindex read-only buffers in interactive
 If the first character in the string is @samp{*}, then an error is
 signaled if the buffer is read-only.
 
-@cindex @samp{@@} in interactive
+@cindex @samp{@@} in @code{interactive}
 @c Emacs 19 feature
 If the first character in the string is @samp{@@}, and if the key
 sequence used to invoke the command includes any mouse events, then
@@ -227,6 +229,17 @@ string (starting with the first character that is not @samp{*} or
 @samp{@@}).
 @end itemize
 
+@cindex examining the @code{interactive} form
+@defun interactive-form function
+This function returns the @code{interactive} form of @var{function}.  If
+@var{function} is a command (@pxref{Interactive Call}), the value is a
+list of the form @code{(interactive @var{spec})}, where @var{spec} is
+the descriptor specification used by the command's @code{interactive}
+form to compute the function's arguments (@pxref{Using Interactive}).
+If @var{function} is not a command, @code{interactive-form} returns
+@code{nil}.
+@end defun
+
 @node Interactive Codes
 @comment  node-name,  next,  previous,  up
 @subsection Code Characters for @code{interactive}
@@ -666,7 +679,6 @@ This variable is always local to the current terminal and cannot be
 buffer-local.  @xref{Multiple Displays}.
 @end defvar
 
-@tindex real-last-command
 @defvar real-last-command
 This variable is set up by Emacs just like @code{last-command},
 but never altered by Lisp programs.
@@ -735,9 +747,11 @@ input events in a string (@pxref{Strings of Events}).
 @tindex clear-this-command-keys
 @defun clear-this-command-keys
 This function empties out the table of events for
-@code{this-command-keys} to return.  This is useful after reading a
-password, to prevent the password from echoing inadvertently as part of
-the next command in certain cases.
+@code{this-command-keys} to return, and also empties the records that
+the function @code{recent-keys} (@pxref{Recording Input}) will
+subsequently return.  This is useful after reading a password, to
+prevent the password from echoing inadvertently as part of the next
+command in certain cases.
 @end defun
 
 @defvar last-nonmenu-event
@@ -870,9 +884,9 @@ The
 @tex
 @math{2^{27}}
 @end tex
-@ifinfo
+@ifnottex
 2**27
-@end ifinfo
+@end ifnottex
 bit in the character code indicates a character
 typed with the meta key held down.
 
@@ -881,9 +895,9 @@ The
 @tex
 @math{2^{26}}
 @end tex
-@ifinfo
+@ifnottex
 2**26
-@end ifinfo
+@end ifnottex
 bit in the character code indicates a non-@sc{ascii}
 control character.
 
@@ -897,9 +911,9 @@ for @kbd{%} plus
 @tex
 @math{2^{26}}
 @end tex
-@ifinfo
+@ifnottex
 2**26
-@end ifinfo
+@end ifnottex
 (assuming the terminal supports non-@sc{ascii}
 control characters).
 
@@ -908,9 +922,9 @@ The
 @tex
 @math{2^{25}}
 @end tex
-@ifinfo
+@ifnottex
 2**25
-@end ifinfo
+@end ifnottex
 bit in the character code indicates an @sc{ascii} control
 character typed with the shift key held down.
 
@@ -921,9 +935,9 @@ character with a different basic code.  In order to keep within the
 @tex
 @math{2^{25}}
 @end tex
-@ifinfo
+@ifnottex
 2**25
-@end ifinfo
+@end ifnottex
 bit for those characters.
 
 However, @sc{ascii} provides no way to distinguish @kbd{C-A} from
@@ -931,9 +945,9 @@ However, @sc{ascii} provides no way to distinguish @kbd{C-A} from
 @tex
 @math{2^{25}}
 @end tex
-@ifinfo
+@ifnottex
 2**25
-@end ifinfo
+@end ifnottex
 bit in @kbd{C-A} and not in
 @kbd{C-a}.
 
@@ -942,9 +956,9 @@ The
 @tex
 @math{2^{24}}
 @end tex
-@ifinfo
+@ifnottex
 2**24
-@end ifinfo
+@end ifnottex
 bit in the character code indicates a character
 typed with the hyper key held down.
 
@@ -953,9 +967,9 @@ The
 @tex
 @math{2^{23}}
 @end tex
-@ifinfo
+@ifnottex
 2**23
-@end ifinfo
+@end ifnottex
 bit in the character code indicates a character
 typed with the super key held down.
 
@@ -964,9 +978,9 @@ The
 @tex
 @math{2^{22}}
 @end tex
-@ifinfo
+@ifnottex
 2**22
-@end ifinfo
+@end ifnottex
 bit in the character code indicates a character typed with
 the alt key held down.  (On some terminals, the key labeled @key{ALT}
 is actually the meta key.)
@@ -1292,9 +1306,16 @@ the value is 3 or greater.  If @var{event} is an ordinary mouse event
 (not a repeat event), the value is 1.
 @end defun
 
-@defvar double-click-time
+@defvar double-click-fuzz
 To generate repeat events, successive mouse button presses must be at
-the same screen position, and the number of milliseconds between
+approximately the same screen position.  The value of
+@code{double-click-fuzz} specifies the maximum number of pixels the
+mouse may be moved between two successive clicks to make a
+double-click.
+@end defvar
+
+@defvar double-click-time
+To generate repeat events, the number of milliseconds between
 successive button presses must be less than the value of
 @code{double-click-time}.  Setting @code{double-click-time} to
 @code{nil} disables multi-click detection entirely.  Setting it to
@@ -1702,9 +1723,9 @@ character is
 @tex
 @math{2^{27}}
 @end tex
-@ifinfo
+@ifnottex
 2**27
-@end ifinfo
+@end ifnottex
 and such numbers cannot be included in a string.
 
   To support programs with @samp{\M-} in string constants, there are
@@ -1722,31 +1743,31 @@ The meta variants of those characters, with codes in the range of
 @tex
 @math{2^{27}}
 @end tex
-@ifinfo
+@ifnottex
 2**27
-@end ifinfo
+@end ifnottex
 to
 @tex
 @math{2^{27} + 127},
 @end tex
-@ifinfo
+@ifnottex
 2**27+127,
-@end ifinfo
+@end ifnottex
 can also go in the string, but you must change their
 numeric values.  You must set the
 @tex
 @math{2^{7}}
 @end tex
-@ifinfo
+@ifnottex
 2**7
-@end ifinfo
+@end ifnottex
 bit instead of the
 @tex
 @math{2^{27}}
 @end tex
-@ifinfo
+@ifnottex
 2**27
-@end ifinfo
+@end ifnottex
 bit, resulting in a value between 128 and 255.  Only a unibyte string
 can include these codes.
 
@@ -1869,7 +1890,7 @@ same symbol that would normally represent that combination of mouse
 button and modifier keys.  The information about the window part is kept
 elsewhere in the event---in the coordinates.  But
 @code{read-key-sequence} translates this information into imaginary
-``prefix keys'', all of which are symbols: @code{heder-line},
+``prefix keys'', all of which are symbols: @code{header-line},
 @code{horizontal-scroll-bar}, @code{menu-bar}, @code{mode-line},
 @code{vertical-line}, and @code{vertical-scroll-bar}.  You can define
 meanings for mouse clicks in special window parts by defining key
@@ -1894,7 +1915,6 @@ and key sequences read from keyboard macros being executed.
 @end defvar
 
 @defvar num-nonmacro-input-events
-@tindex num-nonmacro-input-events
 This variable holds the total number of input events received so far
 from the terminal---not counting those generated by keyboard macros.
 @end defvar
@@ -2471,7 +2491,6 @@ that specify prefix arguments for the following command work by setting
 this variable.
 @end defvar
 
-@tindex last-prefix-arg
 @defvar last-prefix-arg
 The raw prefix argument value used by the previous command.
 @end defvar
@@ -2771,3 +2790,8 @@ The variable is always local to the current terminal and cannot be
 buffer-local.  @xref{Multiple Displays}.
 @end defvar
 
+@defvar kbd-macro-termination-hook
+This normal hook (@pxref{Standard Hooks}) is run when a keyboard
+macro terminates, regardless of what caused it to terminate (reaching
+the macro end or an error which ended the macro prematurely).
+@end defvar