emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/doc/lispref/functions.texi,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/doc/lispref/functions.texi,v
Date: Tue, 21 Oct 2008 09:21:08 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/10/21 09:21:04

Index: functions.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/functions.texi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- functions.texi      20 Oct 2008 10:22:16 -0000      1.14
+++ functions.texi      21 Oct 2008 09:21:02 -0000      1.15
@@ -749,14 +749,17 @@
 @address@hidden@var{m} < @var{n}}} arguments will produce a new function of
 @address@hidden@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.")
address@hidden group
address@hidden
+(1+ 10)
      @result{} 11
 @end group
 @end example




reply via email to

[Prev in Thread] Current Thread [Next in Thread]