diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-10-07 21:02:47 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-10-07 21:02:47 +0000 |
commit | 3fdfa4a9a52ab3d1a790262ee872a49853ad4626 (patch) | |
tree | 76f57a06a5f3b9e0abc15446b38722658fde7e1e /runtime/doc/if_mzsch.txt | |
parent | e5f258eb4c4b87ea1d6f61c1a0a9deecbb5d9726 (diff) | |
download | vim-git-3fdfa4a9a52ab3d1a790262ee872a49853ad4626.tar.gz |
updated for version 7.0017v7.0017
Diffstat (limited to 'runtime/doc/if_mzsch.txt')
-rw-r--r-- | runtime/doc/if_mzsch.txt | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index 269a0cede..d31815a29 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -79,9 +79,33 @@ All the examples below assume this naming scheme. Note that you need to do this again for every buffer. The auto-instantiation can be achieved with autocommands, e.g. you can put -something like this in your .vimrc: > - au VimEnter,BufNew,BufNewFile,BufAdd,BufReadPre * - \:mz (require (prefix vim- vimext) +something like this in your .vimrc (EOFs should not have indentation): > + function s:MzRequire() + if has("mzscheme") + :mz << EOF + (require (prefix vim- vimext)) + (let ((buf (vim-get-buff-by-name (vim-eval "expand(\"<afile>\")")))) + (when (and buf (not (eq? buf (vim-curr-buff)))) + (parameterize ((current-namespace (vim-get-buff-namespace buf))) + (namespace-attach-module vim-global-namespace 'vimext) + (namespace-require '(prefix vim vimext))))) + EOF + endif + endfunction + + function s:MzStartup() + if has("mzscheme") + au BufNew,BufNewFile,BufAdd,BufReadPre * :call s:MzRequire() + :mz << EOF + (current-library-collection-paths + (cons + (build-path (find-system-path 'addon-dir) (version) "collects") + (current-library-collection-paths))) + EOF + endif + endfunction + + call s:MzStartup() < The global namespace just instantiated this module with the prefix "vimext:". |