summaryrefslogtreecommitdiff
path: root/doc/lispref/eval.texi
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-05-04 20:37:30 -0400
committerGlenn Morris <rgm@gnu.org>2012-05-04 20:37:30 -0400
commitddff335186c805b3756cff110033fe118f548f17 (patch)
tree91b95a190047e233c13feec4cb82fbe34d2c4c14 /doc/lispref/eval.texi
parent9824f5052394817ac65302d42a7c97841593e19e (diff)
downloademacs-ddff335186c805b3756cff110033fe118f548f17.tar.gz
More small edits for doc/lispref
* control.texi: Where possible, use example rather than smallexample. (Sequencing, Conditionals, Signaling Errors, Handling Errors): Tweak page breaks. * customize.texi: Where possible, use example rather than smallexample. (Common Keywords, Variable Definitions, Applying Customizations) (Custom Themes): Tweak page breaks. * eval.texi, functions.texi, loading.texi, macros.texi: Where possible, use example rather than smallexample. * sequences.texi (Arrays): Tweak page breaks. * symbols.texi: Where possible, use example rather than smallexample. (Symbol Components): Fix typo. (Other Plists): Tweak page break.
Diffstat (limited to 'doc/lispref/eval.texi')
-rw-r--r--doc/lispref/eval.texi25
1 files changed, 11 insertions, 14 deletions
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index 62de337a5e3..342c79e48e8 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc.
+@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../../info/eval
@node Evaluation, Control Structures, Symbols, Top
@@ -261,16 +261,13 @@ use @code{fset} to set the function cell of a symbol and
into the function cell of @code{first}, and the symbol @code{first} into
the function cell of @code{erste}.
-@smallexample
+@example
@group
;; @r{Build this function cell linkage:}
;; ------------- ----- ------- -------
;; | #<subr car> | <-- | car | <-- | first | <-- | erste |
;; ------------- ----- ------- -------
@end group
-@end smallexample
-
-@smallexample
@group
(symbol-function 'car)
@result{} #<subr car>
@@ -287,19 +284,19 @@ the function cell of @code{erste}.
(erste '(1 2 3)) ; @r{Call the function referenced by @code{erste}.}
@result{} 1
@end group
-@end smallexample
+@end example
By contrast, the following example calls a function without any symbol
function indirection, because the first element is an anonymous Lisp
function, not a symbol.
-@smallexample
+@example
@group
((lambda (arg) (erste arg))
'(1 2 3))
@result{} 1
@end group
-@end smallexample
+@end example
@noindent
Executing the function itself evaluates its body; this does involve
@@ -308,18 +305,18 @@ symbol function indirection when calling @code{erste}.
This form is rarely used and is now deprecated. Instead, you should write it
as:
-@smallexample
+@example
@group
(funcall (lambda (arg) (erste arg))
'(1 2 3))
@end group
-@end smallexample
+@end example
or just
-@smallexample
+@example
@group
(let ((arg '(1 2 3))) (erste arg))
@end group
-@end smallexample
+@end example
The built-in function @code{indirect-function} provides an easy way to
perform symbol function indirection explicitly.
@@ -342,12 +339,12 @@ loop in the chain of symbols.
Here is how you could define @code{indirect-function} in Lisp:
-@smallexample
+@example
(defun indirect-function (function)
(if (symbolp function)
(indirect-function (symbol-function function))
function))
-@end smallexample
+@end example
@end defun
@node Function Forms