updated for version 7.2.336
Problem: MzScheme interface can't evaluate an expression.
Solution: Add mzeval(). (Sergey Khorev)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b813706..b4bd65a 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1826,6 +1826,7 @@
mkdir( {name} [, {path} [, {prot}]])
Number create directory {name}
mode( [expr]) String current editing mode
+mzeval( {expr}) any evaluate |MzScheme| expression
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}) String single char with ASCII value {expr}
pathshorten( {expr}) String shorten directory names in a path
@@ -4102,6 +4103,23 @@
"c" or "n".
Also see |visualmode()|.
+mzeval({expr}) *mzeval()*
+ Evaluate MzScheme expression {expr} and return its result
+ convert to Vim data structures.
+ Numbers and strings are returned as they are.
+ Pairs (including lists and improper lists) and vectors are
+ returned as Vim |Lists|.
+ Hash tables are represented as Vim |Dictionary| type with keys
+ converted to strings.
+ All other types are converted to string with display function.
+ Examples: >
+ :mz (define l (list 1 2 3))
+ :mz (define h (make-hash)) (hash-set! h "list" l)
+ :echo mzeval("l")
+ :echo mzeval("h")
+<
+ {only available when compiled with the |+mzscheme| feature}
+
nextnonblank({lnum}) *nextnonblank()*
Return the line number of the first line at or below {lnum}
that is not blank. Example: >
diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt
index ceecdba..484d09a 100644
--- a/runtime/doc/if_mzsch.txt
+++ b/runtime/doc/if_mzsch.txt
@@ -1,4 +1,4 @@
-*if_mzsch.txt* For Vim version 7.2. Last change: 2009 Jun 24
+*if_mzsch.txt* For Vim version 7.2. Last change: 2010 Jan 19
VIM REFERENCE MANUAL by Sergey Khorev
@@ -9,8 +9,9 @@
1. Commands |mzscheme-commands|
2. Examples |mzscheme-examples|
3. Threads |mzscheme-threads|
-4. The Vim access procedures |mzscheme-vim|
-5. Dynamic loading |mzscheme-dynamic|
+4. Vim access from MzScheme |mzscheme-vim|
+5. mzeval() Vim function |mzscheme-mzeval|
+6. Dynamic loading |mzscheme-dynamic|
{Vi does not have any of these commands}
@@ -142,7 +143,7 @@
GUI version.
==============================================================================
-5. VIM Functions *mzscheme-vim*
+4. Vim access from MzScheme *mzscheme-vim*
*mzscheme-vimext*
The 'vimext' module provides access to procedures defined in the MzScheme
@@ -231,7 +232,13 @@
(set-cursor (line . col) [window]) Set cursor position.
==============================================================================
-5. Dynamic loading *mzscheme-dynamic* *E815*
+5. mzeval() Vim function *mzscheme-mzeval*
+
+To facilitate bi-directional interface, you can use |mzeval| function to
+evaluate MzScheme expressions and pass their values to VimL.
+
+==============================================================================
+6. Dynamic loading *mzscheme-dynamic* *E815*
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
output then includes |+mzscheme/dyn|.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 5305ff1..210179d 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -868,6 +868,8 @@
taglist() get list of matching tags
tagfiles() get a list of tags files
+ mzeval() evaluate |MzScheme| expression
+
==============================================================================
*41.7* Defining a function