Merge from emacs-24; up to 2012-05-02T07:12:52Z!rgm@gnu.org.
[bpt/emacs.git] / doc / lispref / functions.texi
index f1ad252..9e1d3f9 100644 (file)
@@ -3,8 +3,7 @@
 @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
-@node Functions, Macros, Variables, Top
+@node Functions
 @chapter Functions
 
   A Lisp program is composed mainly of Lisp functions.  This chapter
@@ -531,8 +530,7 @@ defines the symbol @var{name} as a function that looks like this:
 @end example
 
 @code{defun} stores this lambda expression in the function cell of
-@var{name}.  It returns the value @var{name}, but usually we ignore this
-value.
+@var{name}.  Its return value is @emph{undefined}.
 
 As described previously, @var{argument-list} is a list of argument
 names and may include the keywords @code{&optional} and @code{&rest}.
@@ -544,9 +542,6 @@ Here are some examples:
 @example
 @group
 (defun foo () 5)
-     @result{} foo
-@end group
-@group
 (foo)
      @result{} 5
 @end group
@@ -554,9 +549,6 @@ Here are some examples:
 @group
 (defun bar (a &optional b &rest c)
     (list a b c))
-     @result{} bar
-@end group
-@group
 (bar 1 2 3 4 5)
      @result{} (1 2 (3 4 5))
 @end group
@@ -577,7 +569,6 @@ Here are some examples:
   (forward-word 1)
   (backward-char 1)
   (capitalize-word 1))
-     @result{} capitalize-backwards
 @end group
 @end example
 
@@ -594,7 +585,7 @@ redefinition from unintentional redefinition.
 @anchor{Definition of defalias}
 This special form defines the symbol @var{name} as a function, with
 definition @var{definition} (which can be any valid Lisp function).
-It returns @var{definition}.
+Its return value is @emph{undefined}.
 
 If @var{docstring} is non-@code{nil}, it becomes the function
 documentation of @var{name}.  Otherwise, any documentation provided by
@@ -1016,9 +1007,6 @@ function.
 @example
 @group
 (defun bar (n) (+ n 2))
-     @result{} bar
-@end group
-@group
 (symbol-function 'bar)
      @result{} (lambda (n) (+ n 2))
 @end group
@@ -1064,9 +1052,6 @@ subsequent attempt to access this cell will cause a
 @example
 @group
 (defun foo (x) x)
-     @result{} foo
-@end group
-@group
 (foo 1)
      @result{}1
 @end group
@@ -1117,7 +1102,7 @@ or the @code{function} special form or the @code{#'} syntax
 (@pxref{Anonymous Functions}), is automatically converted into a
 @dfn{closure}.
 
-@cindex closures
+@cindex closure
   A closure is a function that also carries a record of the lexical
 environment that existed when the function was defined.  When it is
 invoked, any lexical variable references within its definition use the