@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
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
@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
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.
@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.
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])
@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}.
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.
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