1
0
forked from aniani/vim

updated for version 7.2.336

Problem:    MzScheme interface can't evaluate an expression.
Solution:   Add mzeval(). (Sergey Khorev)
This commit is contained in:
Bram Moolenaar
2010-01-19 15:55:06 +01:00
parent 6d8027a6c2
commit 7e506b6a42
15 changed files with 359 additions and 22 deletions

View File

@@ -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: >

View File

@@ -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|.

View File

@@ -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