Mercurial > vim
diff runtime/doc/eval.txt @ 2050:afcf9db31561 v7.2.336
updated for version 7.2.336
Problem: MzScheme interface can't evaluate an expression.
Solution: Add mzeval(). (Sergey Khorev)
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Tue, 19 Jan 2010 15:55:06 +0100 |
parents | de5a43c5eedc |
children | 4a1bcdd9ea55 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1826,6 +1826,7 @@ min( {list}) Number minimum value of i 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 indica "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: >