changeset 98962:89d49db15c3c

(Calling Functions): Use `defalias' instead of `fset'. Fix wording.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 21 Oct 2008 09:21:02 +0000
parents 85eb1353b004
children 5acd30038b76
files doc/lispref/functions.texi
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/doc/lispref/functions.texi	Tue Oct 21 09:19:37 2008 +0000
+++ b/doc/lispref/functions.texi	Tue Oct 21 09:21:02 2008 +0000
@@ -749,14 +749,17 @@
 @w{@code{@var{m} < @var{n}}} arguments will produce a new function of
 @w{@code{@var{n} - @var{m}}} arguments.
 
-Here's an example of using @code{apply-partially} to produce a variant
-of the Emacs Lisp primitive @code{1+}, a function that increments its
-argument by one, based on the primitive @code{+}:
+Here's how we could define the built-in function @code{1+}, if it
+didn't exist, using @code{apply-partially} and @code{+}, another
+built-in function:
 
 @example
-(fset 'incr-by-one (apply-partially '+ 1))
 @group
-(incr-by-one 10)
+(defalias '1+ (apply-partially '+ 1)
+  "Increment argument by one.")
+@end group
+@group
+(1+ 10)
      @result{} 11
 @end group
 @end example