]> code.delx.au - gnu-emacs/blobdiff - lispref/functions.texi
(Command Loop Info): Explain how read-event affects this-command-keys.
[gnu-emacs] / lispref / functions.texi
index 409f0125ad80257f17f1f77db8825322dd2d5924..a4c0b4b8fe4b57d18714632cbbdb93603c9b9a2e 100644 (file)
@@ -1,7 +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, 1999, 2004
-@c   Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003,
+@c   2004, 2005, 2006 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/functions
 @node Functions, Macros, Variables, Top
@@ -99,7 +99,7 @@ Keyboard macros (strings and vectors) are commands also, even though
 they are not functions.  A symbol is a command if its function
 definition is a command; such symbols can be invoked with @kbd{M-x}.
 The symbol is a function as well if the definition is a function.
-@xref{Command Overview}.
+@xref{Interactive Call}.
 
 @item keystroke command
 @cindex keystroke command
@@ -152,7 +152,6 @@ function.  For example:
 @end defun
 
 @defun subr-arity subr
-@tindex subr-arity
 This function provides information about the argument list of a
 primitive, @var{subr}.  The returned value is a pair
 @code{(@var{min} . @var{max})}.  @var{min} is the minimum number of
@@ -486,7 +485,7 @@ more convenient than making the function definition point to itself
 practice).
 
   We often identify functions with the symbols used to name them.  For
-example, we often speak of ``the function @code{car}'', not
+example, we often speak of ``the function @code{car},'' not
 distinguishing between the symbol @code{car} and the primitive
 subr-object that is its function definition.  For most purposes, the
 distinction is not important.
@@ -525,9 +524,9 @@ defines the symbol @var{name} as a function that looks like this:
 @var{name}.  It returns the value @var{name}, but usually we ignore this
 value.
 
-As described previously (@pxref{Lambda Expressions}),
-@var{argument-list} is a list of argument names and may include the
-keywords @code{&optional} and @code{&rest}.  Also, the first two of the
+As described previously, @var{argument-list} is a list of argument
+names and may include the keywords @code{&optional} and @code{&rest}
+(@pxref{Lambda Expressions}).  Also, the first two of the
 @var{body-forms} may be a documentation string and an interactive
 declaration.
 
@@ -767,12 +766,10 @@ in turn, and returns a list of the results.
 The argument @var{sequence} can be any kind of sequence except a
 char-table; that is, a list, a vector, a bool-vector, or a string.  The
 result is always a list.  The length of the result is the same as the
-length of @var{sequence}.
+length of @var{sequence}.  For example:
 
 @smallexample
 @group
-@exdent @r{For example:}
-
 (mapcar 'car '((a b) (c d) (e f)))
      @result{} (a c e)
 (mapcar '1+ [1 2 3])
@@ -807,7 +804,6 @@ Return the list of results."
 @end defun
 
 @defun mapc function sequence
-@tindex mapc
 @code{mapc} is like @code{mapcar} except that @var{function} is used for
 side-effects only---the values it returns are ignored, not collected
 into a list.  @code{mapc} always returns @var{sequence}.
@@ -848,7 +844,7 @@ bool-vector, or a string.
 
   In Lisp, a function is a list that starts with @code{lambda}, a
 byte-code function compiled from such a list, or alternatively a
-primitive subr-object; names are ``extra''.  Although usually functions
+primitive subr-object; names are ``extra.''  Although usually functions
 are defined with @code{defun} and given names at the same time, it is
 occasionally more concise to use an explicit lambda expression---an
 anonymous function.  Such a list is valid wherever a function name is.
@@ -1174,20 +1170,13 @@ You can define a function as an alias and declare it obsolete at the
 same time using the macro @code{define-obsolete-function-alias}.
 
 @defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring
-This macro marks the function @var{obsolete-name} obsolete and also defines
-it as an alias for the function @var{current-name}.  A typical call has the
-form:
-
-@example
-(define-obsolete-function-alias 'old-fun 'new-fun "22.1" "Doc.")
-@end example
-
-@noindent
-which is equivalent to the following two lines of code:
+This macro marks the function @var{obsolete-name} obsolete and also
+defines it as an alias for the function @var{current-name}.  It is
+equivalent to the following:
 
 @example
-(defalias 'old-fun 'new-fun "Doc.")
-(make-obsolete 'old-fun 'new-fun "22.1")
+(defalias @var{obsolete-name} @var{current-name} @var{docstring})
+(make-obsolete @var{obsolete-name} @var{current-name} @var{when})
 @end example
 @end defmac