merge trunk
[bpt/emacs.git] / doc / lispref / functions.texi
index fc56e80..ada0086 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2011
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/functions
@@ -23,8 +23,6 @@ define them.
                             of a symbol.
 * Obsolete Functions::    Declaring functions obsolete.
 * Inline Functions::      Defining functions that the compiler will open code.
-* Function Currying::     Making wrapper functions that pre-specify
-                            some arguments.
 * Declaring Functions::   Telling the compiler that a function is defined.
 * Function Safety::       Determining whether a function is safe to call.
 * Related Topics::        Cross-references to specific Lisp primitives
@@ -113,25 +111,14 @@ editors; for Lisp programs, the distinction is normally unimportant.
 
 @item byte-code function
 A @dfn{byte-code function} is a function that has been compiled by the
-byte compiler.  A byte-code function is actually a special case of a
-@dfn{funvec} object (see below).
-
-@item function vector
-A @dfn{function vector}, or @dfn{funvec} is a vector-like object whose
-purpose is to define special kinds of functions.  @xref{Funvec Type}.
-
-The exact meaning of the vector elements is determined by the type of
-funvec: the most common use is byte-code functions, which have a
-list---the argument list---as the first element.  Further types of
-funvec object are:
-
-@table @code
-@item curry
-A curried function.  Remaining arguments in the funvec are function to
-call, and arguments to prepend to user arguments at the time of the
-call; @xref{Function Currying}.
-@end table
-
+byte compiler.  @xref{Byte-Code Type}.
+
+@item autoload object
+@cindex autoload object
+An @dfn{autoload object} is a place-holder for a real function.  If
+the autoload object is called, it will make Emacs load the file
+containing the definition of the real function, and then call the real
+function instead.
 @end table
 
 @defun functionp object
@@ -172,11 +159,6 @@ function.  For example:
 @end example
 @end defun
 
-@defun funvecp object
-@code{funvecp} returns @code{t} if @var{object} is a function vector
-object (including byte-code objects), and @code{nil} otherwise.
-@end defun
-
 @defun subr-arity subr
 This function provides information about the argument list of a
 primitive, @var{subr}.  The returned value is a pair
@@ -808,6 +790,12 @@ This function returns @var{arg} and has no side effects.
 This function ignores any arguments and returns @code{nil}.
 @end defun
 
+  Emacs Lisp functions can also be user-visible @dfn{commands}.  A
+command is a function that has an @dfn{interactive} specification.
+You may want to call these functions as if they were called
+interactively.  See @ref{Interactive Call} for details on how to do
+that.
+
 @node Mapping Functions
 @section Mapping Functions
 @cindex mapping functions
@@ -1302,49 +1290,6 @@ do for macros.  (@xref{Argument Evaluation}.)
 Inline functions can be used and open-coded later on in the same file,
 following the definition, just like macros.
 
-@node Function Currying
-@section Function Currying
-@cindex function currying
-@cindex currying
-@cindex partial-application
-
-Function currying is a way to make a new function that calls an
-existing function with a partially pre-determined argument list.
-
-@defun curry function &rest args
-Return a function-like object that will append any arguments it is
-called with to @var{args}, and call @var{function} with the resulting
-list of arguments.
-
-For example, @code{(curry 'concat "The ")} returns a function that
-concatenates @code{"The "} and its arguments.  Calling this function
-on @code{"end"} returns @code{"The end"}:
-
-@example
-(funcall (curry 'concat "The ") "end")
-     @result{} "The end"
-@end example
-
-The @dfn{curried function} is useful as an argument to @code{mapcar}:
-
-@example
-(mapcar (curry 'concat "The ") '("big" "red" "balloon"))
-     @result{} ("The big" "The red" "The balloon")
-@end example
-@end defun
-
-Function currying may be implemented in any Lisp by constructing a
-@code{lambda} expression, for instance:
-
-@example
-(defun curry (function &rest args)
-  `(lambda (&rest call-args)
-      (apply #',function ,@@args call-args)))
-@end example
-
-However in Emacs Lisp, a special curried function object is used for
-efficiency.  @xref{Funvec Type}.
-
 @node Declaring Functions
 @section Telling the Compiler that a Function is Defined
 @cindex function declaration