summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-01-19 15:55:06 +0100
committerBram Moolenaar <Bram@vim.org>2010-01-19 15:55:06 +0100
commit7e506b6a420588b01dbcbed9ad968b0e6d6a8785 (patch)
tree80a1e4822f8dc3fe008dc8de530966e15fd507b1 /runtime
parent6d8027a6c2b80318ca154ca6cde0fd930f149f03 (diff)
updated for version 7.2.336v7.2.336
Problem: MzScheme interface can't evaluate an expression. Solution: Add mzeval(). (Sergey Khorev)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt18
-rw-r--r--runtime/doc/if_mzsch.txt17
-rw-r--r--runtime/doc/usr_41.txt2
3 files changed, 32 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b813706a57..b4bd65a358 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1826,6 +1826,7 @@ min( {list}) Number minimum value of items in {list}
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 @@ mode([expr]) Return a string that indicates the current mode.
"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 ceecdba302..484d09aa8a 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 @@ The MzScheme Interface to Vim *mzscheme* *MzScheme*
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 @@ Thread scheduling in the console version of Vim is less reliable than in the
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 @@ Windows *mzscheme-window*
(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 5305ff18bc..210179dae4 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -868,6 +868,8 @@ Various:
taglist() get list of matching tags
tagfiles() get a list of tags files
+ mzeval() evaluate |MzScheme| expression
+
==============================================================================
*41.7* Defining a function