[librep] Doc. * Declared that ebuild is not an official one. * Internal 64-bit integer availability. * Improv



commit c6117b46eeb58c3e67592c80f4b293993725e30d
Author: Teika kazura <teika lavabit com>
Date:   Sat Jun 26 14:30:45 2010 +0900

    Doc.
    * Declared that ebuild is not an official one.
    * Internal 64-bit integer availability.
    * Improved 'let' and fluid description.
    * And so on.

 librep.ebuild.in |    7 +++++-
 man/lang.texi    |   55 +++++++++++++++++++++++++++++++++++++++++------------
 man/news.texi    |    6 +++++
 src/repint.h     |    2 +-
 src/structures.c |    5 ++-
 5 files changed, 58 insertions(+), 17 deletions(-)
---
diff --git a/librep.ebuild.in b/librep.ebuild.in
index 3a06e97..a2e49ba 100644
--- a/librep.ebuild.in
+++ b/librep.ebuild.in
@@ -1,6 +1,11 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/librep/librep- VERSION@.ebuild,v 1.11 2006/10/20 00:24:49 kloeri Exp $
+# $Header: $
+
+# This is *not* an official ebuild of any distributions.
+# After the configure script is run, required package versions are
+# filled in. But other than that, there's no guarantee this is a
+# correct ebuild.
 
 inherit eutils libtool toolchain-funcs multilib autotools
 
diff --git a/man/lang.texi b/man/lang.texi
index 461f85a..50d909f 100644
--- a/man/lang.texi
+++ b/man/lang.texi
@@ -737,7 +737,9 @@ representation.}.
 
 Without gmp, only integer is exact. Rational numbers get approximated
 with float. On 32-bit system, integer is signed 30-bit (@emph{not} 32
-bits), and 62-bit on 64-bit system.
+bits), and 62-bit on 64-bit system  footnote{Internally, unsigned 64-bit
+integer is supported too, and used in some cases. But this is not
+available to Lisp programmers.}
 
 Inexact numbers are currently implemented using double precision
 floating point values.
@@ -3011,7 +3013,7 @@ the current environment.
 * Void Variables::              Some variables have no values
 * Defining Variables::          How to define a variable before
                                   using it
-* Fluid Variables::             Another dynamic bindingd methodb
+* Fluid Variables::             Another dynamic binding method
 @end menu
 
 
@@ -3039,7 +3041,7 @@ when the stack is empty the value of the variable is void (@pxref{Void
 Variables}). Assigning a value to the variable (@pxref{Setting
 Variables}) overwrites the top value on the stack with a new value.
 When the value of the variable is required it is simply read from the
-top of the stack.
+top of the stack. See also @xref{Fluid Variables}.
 
 Apart from function applications there are two special forms which
 perform variable binding (i.e. creating local variables), @code{let}
@@ -3070,6 +3072,23 @@ to bind to that variable.
     @result{} (4 . ())
 foo
     @result{} 42        ;The original values is back
+
+;; More on scope.
+(define a 'outer)
+(define (foo) a)
+
+(define (bar)
+   (let ((a 'inner)) (foo)))
+
+(bar)
+   @result{} outer
+;; The let binding is newly established inside of bar,
+;; and foo doesn't see it.
+
+;; Difference to defvar.
+(defvar a 'outer)
+(bar)
+   @result{} inner ;; The scope of a is now dynamic.
 @end lisp
 
 No bindings are made until all new values have been computed. For
@@ -3090,7 +3109,7 @@ Although @code{foo} is given a new binding this is not actually done
 until all the new values have been computed, hence @code{bar} is
 bound to the @emph{old} value of @code{foo}.
 
-The second form, @code{(let variable bindings body...)}, can be
+The second form, @code{(let function bindings body...)}, can be
 used to make a loop. (@pxref{Looping Structures})
 @end defmac
 
@@ -3287,13 +3306,13 @@ reference the value of such a symbol will result in an error. It is
 possible for the most recent binding of a variable to be void even though
 the inactive bindings may have values.
 
- defun boundp variable
-Returns true if the symbol @var{variable} has a value.
+ defun boundp symbol
+Returns true if @var{symbol} is bound to a variable.
 @end defun
 
- defun makunbound variable
-This function makes the current binding of the symbol @var{variable} be
-void, then returns @var{variable}.
+ defun makunbound symbol
+This function makes the current binding of @var{symbol} as a variable be
+void, then returns @var{symbol}.
 
 @lisp
 (setq foo 42)
@@ -3311,7 +3330,6 @@ foo
 @end lisp
 @end defun
 
-
 @node Defining Variables, Fluid Variables, Void Variables, Variables
 @subsection Defining Variables
 @cindex Defining variables
@@ -3430,8 +3448,19 @@ Here is an example code fragment using fluid variables and
 (let-fluids ((a 1)
              (b 2))
   (+ (fluid a) (fluid b))) @result{} 3
- end lisp
 
+;; Compare with let.
+(define c 'outer)
+(define (foo) c)
+
+(define (bar)
+   (let ((c 'inner)) (foo)))
+
+(bar)
+   @result{} outer
+;; The let binding is newly established inside of bar,
+;; and foo doesn't see it.
+ end lisp
 
 @node Functions, Macros, Variables, The language
 @section Functions
@@ -4775,10 +4804,10 @@ returns the value of the last @var{expr} form evaluated.
 The ``named-let'' variant of the @code{let} form also provides a
 convenient looping construct.
 
- defmac let variable bindings body dots{}
+ defmac let function bindings body dots{}
 This is the same as the @code{(let @var{bindings} @var{body} dots{})}
 form described in @ref{Local Variables}, but within the
- var{body}@dots{} forms, the symbol @var{variable} is bound to a
+ var{body}@dots{} forms, the symbol @var{fuction} is bound to a
 function whose parameters are the bound variables defined by
 @var{bindings} and whose body is the sequence of forms
 @var{body} dots{}
diff --git a/man/news.texi b/man/news.texi
index d9f5d28..72d7578 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -4,6 +4,12 @@
 @cindex News
 
 @heading 0.90.7
+ itemize @bullet
+ item Some documentation improvements [Teika kazura]
+
+Better explanation on @code{fluid} and @code{let}.
+
+ end itemize
 
 @heading 0.90.6
 @itemize @bullet
diff --git a/src/repint.h b/src/repint.h
index 2b16826..378abeb 100644
--- a/src/repint.h
+++ b/src/repint.h
@@ -124,7 +124,7 @@ typedef struct rep_struct_struct rep_struct;
 struct rep_struct_struct {
     repv car;
     rep_struct *next;
-    repv name;
+  repv name; /* symbol, not string */
     repv inherited;	/* exported symbols that have no local binding */
     int total_buckets, total_bindings;
     rep_struct_node **buckets;
diff --git a/src/structures.c b/src/structures.c
index 9b40373..c4d83f4 100644
--- a/src/structures.c
+++ b/src/structures.c
@@ -934,7 +934,7 @@ DEFUN ("structure-name", Fstructure_name,
 ::doc:rep.structures#structure-name::
 structure-name STRUCTURE
 
-Returns the name of structure object STRUCTURE.
+Returns the name (a symbol) of structure object STRUCTURE.
 ::end:: */
 {
     rep_DECLARE1 (structure, rep_STRUCTUREP);
@@ -1070,7 +1070,8 @@ DEFUN("intern-structure", Fintern_structure,
 intern-structure STRUCT-NAME
 
 Return the structure called STRUCT-NAME. If no such structure exists,
-attempt to load it.
+attempt to load it into the root structure, i.e. it's loaded, but
+the current module is not affected.
 ::end:: */
 {
     repv tem;



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