emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115739: Rephrase lexical binding requirement senten


From: Tassilo Horn
Subject: [Emacs-diffs] trunk r115739: Rephrase lexical binding requirement sentence.
Date: Wed, 25 Dec 2013 09:12:28 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115739
revision-id: address@hidden
parent: address@hidden
committer: Tassilo Horn <address@hidden>
branch nick: trunk
timestamp: Wed 2013-12-25 10:12:24 +0100
message:
  Rephrase lexical binding requirement sentence.
  
  * doc/lispref/control.texi (Pattern matching case statement): Rephrase lexical
  binding requirement: the example needs it, not `pcase' itself.
modified:
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/control.texi       
control.texi-20091113204419-o5vbwnq5f7feedwu-6169
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2013-12-25 03:05:11 +0000
+++ b/doc/lispref/ChangeLog     2013-12-25 09:12:24 +0000
@@ -1,3 +1,8 @@
+2013-12-25  Tassilo Horn  <address@hidden>
+
+       * control.texi (Pattern matching case statement): Rephrase lexical
+       binding requirement: the example needs it, not `pcase' itself.
+
 2013-12-25  Chong Yidong  <address@hidden>
 
        * eval.texi (Eval): Document the LEXICAL arg to eval.

=== modified file 'doc/lispref/control.texi'
--- a/doc/lispref/control.texi  2013-12-24 15:30:59 +0000
+++ b/doc/lispref/control.texi  2013-12-25 09:12:24 +0000
@@ -342,19 +342,20 @@
 @code{(pred numberp)} is a pattern that simply checks that @code{exp}
 is a number, and @code{_} is the catch-all pattern that matches anything.
 
+Note that the the lambda being the result of the @code{fn} clause is a
+closure (@pxref{Closures}), so the file defining @code{evaluate} must
+have lexical binding enabled (@pxref{Using Lexical Binding}, for how
+to enable it).
+
 Here are some sample programs including their evaluation results:
 
 @example
 (evaluate '(add 1 2) nil)                 ;=> 3
 (evaluate '(add x y) '((x . 1) (y . 2)))  ;=> 3
 (evaluate '(call (fn x (add 1 x)) 2) nil) ;=> 3
-(evaluate '(sub 1 2) nil)                 ;=> (error "Unknown expression (sub 
1 2)")
+(evaluate '(sub 1 2) nil)                 ;=> error
 @end example
 
-Note that (parts of) @code{pcase} only work as expected with lexical
-binding, so lisp files using @code{pcase} should have enable it
-(@pxref{Using Lexical Binding}, for how to enable lexical binding).
-
 There are two kinds of patterns involved in @code{pcase}, called
 @emph{U-patterns} and @emph{Q-patterns}.  The @var{upattern} mentioned above
 are U-patterns and can take the following forms:


reply via email to

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