mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.2-191
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 7.2. Last change: 2008 Jun 28
|
||||
*if_mzsch.txt* For Vim version 7.2. Last change: 2009 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@@ -42,10 +42,6 @@ Note: On FreeBSD you should use the "drscheme" port.
|
||||
|
||||
*:mzfile* *:mzf*
|
||||
:[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi}
|
||||
All statements are executed in the namespace of the
|
||||
buffer that was current during :mzfile start.
|
||||
If you want to access other namespaces, use
|
||||
'parameterize'.
|
||||
|
||||
All of these commands do essentially the same thing - they execute a piece of
|
||||
MzScheme code, with the "current range" set to the given line
|
||||
@@ -54,8 +50,6 @@ range.
|
||||
In the case of :mzscheme, the code to execute is in the command-line.
|
||||
In the case of :mzfile, the code to execute is the contents of the given file.
|
||||
|
||||
Each buffer has its own MzScheme namespace. Global namespace is bound to
|
||||
the "global-namespace" value from the 'vimext' module.
|
||||
MzScheme interface defines exception exn:vim, derived from exn.
|
||||
It is raised for various Vim errors.
|
||||
|
||||
@@ -79,40 +73,8 @@ To avoid clashes with MzScheme, consider using prefix when requiring module,
|
||||
e.g.: >
|
||||
:mzscheme (require (prefix vim- vimext))
|
||||
<
|
||||
All the examples below assume this naming scheme. Note that you need to do
|
||||
this again for every buffer.
|
||||
All the examples below assume this naming scheme.
|
||||
|
||||
The auto-instantiation can be achieved with autocommands, e.g. you can put
|
||||
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:".
|
||||
*mzscheme-sandbox*
|
||||
When executed in the |sandbox|, access to some filesystem and Vim interface
|
||||
procedures is restricted.
|
||||
@@ -121,15 +83,20 @@ procedures is restricted.
|
||||
2. Examples *mzscheme-examples*
|
||||
>
|
||||
:mzscheme (display "Hello")
|
||||
:mz (display (string-append "Using MzScheme version " (version)))
|
||||
:mzscheme (require (prefix vim- vimext)) ; for MzScheme < 4.x
|
||||
:mzscheme (require (prefix-in vim- 'vimext)) ; MzScheme 4.x
|
||||
:mzscheme (vim-set-buff-line 10 "This is line #10")
|
||||
<
|
||||
Inline script usage: >
|
||||
function! <SID>SetFirstLine()
|
||||
:mz << EOF
|
||||
(display "!!!")
|
||||
(require (prefix vim- vimext))
|
||||
; for newer versions (require (prefix-in vim- 'vimext))
|
||||
(vim-set-buff-line 1 "This is line #1")
|
||||
(vim-beep)
|
||||
EOF
|
||||
EOF
|
||||
endfunction
|
||||
|
||||
nmap <F9> :call <SID>SetFirstLine() <CR>
|
||||
@@ -137,17 +104,33 @@ Inline script usage: >
|
||||
File execution: >
|
||||
:mzfile supascript.scm
|
||||
<
|
||||
Accessing the current buffer namespace from an MzScheme program running in
|
||||
another buffer within |:mzfile|-executed script : >
|
||||
; Move to the window below
|
||||
(vim-command "wincmd j")
|
||||
; execute in the context of buffer, to which window belongs
|
||||
; assume that buffer has 'textstring' defined
|
||||
(parameterize ((current-namespace
|
||||
(vim-get-buff-namespace (vim-curr-buff))))
|
||||
(eval '(vim-set-buff-line 1 textstring)))
|
||||
Vim exception handling: >
|
||||
:mz << EOF
|
||||
(require (prefix vim- vimext))
|
||||
; for newer versions (require (prefix-in vim- 'vimext))
|
||||
(with-handlers
|
||||
([exn:vim? (lambda (e) (display (exn-message e)))])
|
||||
(vim-eval "nonsense-string"))
|
||||
EOF
|
||||
<
|
||||
Auto-instantiation of vimext module (can be placed in your |vimrc|): >
|
||||
function! MzRequire()
|
||||
:redir => l:mzversion
|
||||
:mz (version)
|
||||
:redir END
|
||||
if strpart(l:mzversion, 1, 1) < "4"
|
||||
" MzScheme versions < 4.x:
|
||||
:mz (require (prefix vim- vimext))
|
||||
else
|
||||
" newer versions:
|
||||
:mz (require (prefix-in vim- 'vimext))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
if has("mzscheme")
|
||||
silent call MzRequire()
|
||||
endif
|
||||
<
|
||||
==============================================================================
|
||||
3. Threads *mzscheme-threads*
|
||||
|
||||
@@ -168,11 +151,11 @@ interface.
|
||||
Common
|
||||
------
|
||||
(command {command-string}) Perform the vim ":Ex" style command.
|
||||
(eval {expr-string}) Evaluate the vim expression to a string.
|
||||
A |List| is turned into a string by
|
||||
joining the items and inserting line
|
||||
breaks.
|
||||
NOTE clashes with MzScheme eval
|
||||
(eval {expr-string}) Evaluate the vim expression into
|
||||
respective MzScheme object: |Lists| are
|
||||
represented as Scheme lists,
|
||||
|Dictionaries| as hash tables.
|
||||
NOTE the name clashes with MzScheme eval
|
||||
(range-start) Start/End of the range passed with
|
||||
(range-end) the Scheme command.
|
||||
(beep) beep
|
||||
@@ -186,7 +169,6 @@ Common
|
||||
be set. The symbol 'global can be passed
|
||||
as {buffer-or-window}. Then |:setglobal|
|
||||
will be used.
|
||||
global-namespace The MzScheme main namespace.
|
||||
|
||||
Buffers *mzscheme-buffer*
|
||||
-------
|
||||
@@ -228,7 +210,6 @@ Buffers *mzscheme-buffer*
|
||||
if there is no such buffer.
|
||||
(get-buff-by-num {buffernum}) Get a buffer by its number (return #f if
|
||||
there is no buffer with this number).
|
||||
(get-buff-namespace [buffer]) Get buffer namespace.
|
||||
|
||||
Windows *mzscheme-window*
|
||||
------
|
||||
@@ -250,7 +231,7 @@ Windows *mzscheme-window*
|
||||
(set-cursor (line . col) [window]) Set cursor position.
|
||||
|
||||
==============================================================================
|
||||
5. Dynamic loading *mzscheme-dynamic*
|
||||
5. Dynamic loading *mzscheme-dynamic* *E812*
|
||||
|
||||
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
|
||||
output then includes |+mzscheme/dyn|.
|
||||
|
@@ -115,8 +115,21 @@ ifndef MZSCHEME_VER
|
||||
MZSCHEME_VER=205_000
|
||||
endif
|
||||
|
||||
ifndef MZSCHEME_PRECISE_GC
|
||||
MZSCHEME_PRECISE_GC=no
|
||||
endif
|
||||
|
||||
# for version 4.x we need to generate byte-code for Scheme base
|
||||
ifndef MZSCHEME_GENERATE_BASE
|
||||
MZSCHEME_GENERATE_BASE=no
|
||||
endif
|
||||
|
||||
ifeq (no,$(DYNAMIC_MZSCHEME))
|
||||
ifeq (yes,$(MZSCHEME_PRECISE_GC))
|
||||
MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
|
||||
else
|
||||
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
|
||||
endif
|
||||
# the modern MinGW can dynamically link to dlls directly.
|
||||
# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
|
||||
ifndef MZSCHEME_DLLS
|
||||
@@ -410,6 +423,13 @@ endif
|
||||
ifdef MZSCHEME
|
||||
OBJ += $(OUTDIR)/if_mzsch.o
|
||||
MZSCHEME_INCL = if_mzsch.h
|
||||
ifeq (yes,$(MZSCHEME_GENERATE_BASE))
|
||||
CFLAGS += -DINCLUDE_MZSCHEME_BASE
|
||||
MZ_EXTRA_DEP += mzscheme_base.c
|
||||
endif
|
||||
ifeq (yes,$(MZSCHEME_PRECISE_GC))
|
||||
CFLAGS += -DMZ_PRECISE_GC
|
||||
endif
|
||||
endif
|
||||
ifdef PYTHON
|
||||
OBJ += $(OUTDIR)/if_python.o
|
||||
@@ -588,6 +608,12 @@ if_perl.c: if_perl.xs typemap
|
||||
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
|
||||
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
|
||||
|
||||
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
|
||||
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
|
||||
|
||||
mzscheme_base.c:
|
||||
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
|
||||
|
||||
pathdef.c: $(INCL)
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
@echo creating pathdef.c
|
||||
|
@@ -34,6 +34,7 @@
|
||||
# MZSCHEME=[Path to MzScheme directory]
|
||||
# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
|
||||
# MZSCHEME_VER=[version, 205_000, ...]
|
||||
# MZSCHEME_DEBUG=no
|
||||
#
|
||||
# Perl interface:
|
||||
# PERL=[Path to Perl directory]
|
||||
@@ -621,15 +622,37 @@ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
|
||||
MZSCHEME_VER = 205_000
|
||||
!endif
|
||||
CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
|
||||
!if EXIST("$(MZSCHEME)\collects\scheme\base.ss")
|
||||
# for MzScheme 4.x we need to include byte code for basic Scheme stuff
|
||||
MZSCHEME_EXTRA_DEP = mzscheme_base.c
|
||||
CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
|
||||
!endif
|
||||
!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") \
|
||||
&& !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
|
||||
!message Building with Precise GC
|
||||
MZSCHEME_PRECISE_GC = yes
|
||||
CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
|
||||
!endif
|
||||
!if "$(DYNAMIC_MZSCHEME)" == "yes"
|
||||
!if "$(MZSCHEME_PRECISE_GC)" == "yes"
|
||||
!error MzScheme with Precise GC cannot be loaded dynamically
|
||||
!endif
|
||||
!message MzScheme DLLs will be loaded dynamically
|
||||
CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
|
||||
-DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
|
||||
-DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
||||
!else
|
||||
!if "$(MZSCHEME_DEBUG)" == "yes"
|
||||
CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
|
||||
!endif
|
||||
!if "$(MZSCHEME_PRECISE_GC)" == "yes"
|
||||
# Precise GC does not use separate dll
|
||||
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
|
||||
!else
|
||||
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
|
||||
$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
|
||||
!endif
|
||||
!endif
|
||||
MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
|
||||
!endif
|
||||
|
||||
@@ -930,9 +953,11 @@ $(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
|
||||
$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
|
||||
|
||||
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL)
|
||||
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL) $(MZSCHEME_EXTRA_DEP)
|
||||
$(CC) $(CFLAGS) if_mzsch.c \
|
||||
-DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
|
||||
mzscheme_base.c:
|
||||
$(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base
|
||||
|
||||
$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
|
||||
|
@@ -536,7 +536,7 @@ CClink = $(CC)
|
||||
# Use this with GCC to check for mistakes, unused arguments, etc.
|
||||
#CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code
|
||||
#PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers
|
||||
#MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code
|
||||
#MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter
|
||||
|
||||
# EFENCE - Electric-Fence malloc debugging: catches memory accesses beyond
|
||||
# allocated memory (and makes every malloc()/free() very slow).
|
||||
@@ -2200,6 +2200,7 @@ clean celan: testclean
|
||||
-rm -f $(TOOLS) auto/osdef.h auto/pathdef.c auto/if_perl.c
|
||||
-rm -f conftest* *~ auto/link.sed
|
||||
-rm -rf $(APPDIR)
|
||||
-rm -rf mzscheme_base.c
|
||||
if test -d $(PODIR); then \
|
||||
cd $(PODIR); $(MAKE) prefix=$(DESTDIR)$(prefix) clean; \
|
||||
fi
|
||||
@@ -2433,8 +2434,11 @@ objects/if_cscope.o: if_cscope.c
|
||||
objects/if_xcmdsrv.o: if_xcmdsrv.c
|
||||
$(CCC) -o $@ if_xcmdsrv.c
|
||||
|
||||
objects/if_mzsch.o: if_mzsch.c
|
||||
objects/if_mzsch.o: if_mzsch.c $(MZSCHEME_EXTRA)
|
||||
$(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
|
||||
|
||||
mzscheme_base.c:
|
||||
$(MZSCHEME_MZC) --c-mods mzscheme_base.c ++lib scheme/base
|
||||
|
||||
objects/if_perl.o: auto/if_perl.c
|
||||
$(CCC) -o $@ auto/if_perl.c
|
||||
|
74
src/auto/configure
vendored
74
src/auto/configure
vendored
@@ -701,6 +701,8 @@ PERL_SRC
|
||||
shrpenv
|
||||
vi_cv_perllib
|
||||
vi_cv_path_perl
|
||||
MZSCHEME_MZC
|
||||
MZSCHEME_EXTRA
|
||||
MZSCHEME_CFLAGS
|
||||
MZSCHEME_LIBS
|
||||
MZSCHEME_PRO
|
||||
@@ -4641,8 +4643,8 @@ $as_echo_n "checking PLTHOME environment var... " >&6; }
|
||||
$as_echo "\"$PLTHOME\"" >&6; }
|
||||
vi_cv_path_mzscheme_pfx="$PLTHOME"
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: \"not set\"" >&5
|
||||
$as_echo "\"not set\"" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: result: not set" >&5
|
||||
$as_echo "not set" >&6; }
|
||||
# Extract the first word of "mzscheme", so it can be a program name with args.
|
||||
set dummy mzscheme; ac_word=$2
|
||||
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
@@ -4697,16 +4699,16 @@ $as_echo_n "checking MzScheme install prefix... " >&6; }
|
||||
if test "${vi_cv_path_mzscheme_pfx+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
vi_cv_path_mzscheme_pfx=`
|
||||
${vi_cv_path_mzscheme} -evm \
|
||||
"(display (simplify-path \
|
||||
echo "(display (simplify-path \
|
||||
(build-path (call-with-values \
|
||||
(lambda () (split-path (find-system-path (quote exec-file)))) \
|
||||
(lambda (base name must-be-dir?) base)) (quote up))))"`
|
||||
(lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
|
||||
vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
|
||||
sed -e 's+/$++'`
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $vi_cv_path_mzscheme_pfx" >&5
|
||||
$as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
|
||||
vi_cv_path_mzscheme_pfx=`echo "$vi_cv_path_mzscheme_pfx" | sed 's+/$++'`
|
||||
rm -f mzdirs.scm
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -4716,21 +4718,32 @@ $as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
|
||||
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
|
||||
if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
|
||||
{ $as_echo "$as_me:$LINENO: result: \"yes\"" >&5
|
||||
$as_echo "\"yes\"" >&6; }
|
||||
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: \"no\"" >&5
|
||||
$as_echo "\"no\"" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/plt/include" >&5
|
||||
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/plt/include... " >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
|
||||
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
|
||||
if test -f $vi_cv_path_mzscheme_pfx/include/plt/scheme.h; then
|
||||
{ $as_echo "$as_me:$LINENO: result: \"yes\"" >&5
|
||||
$as_echo "\"yes\"" >&6; }
|
||||
SCHEME_INC=/plt
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: \"no\"" >&5
|
||||
$as_echo "\"no\"" >&6; }
|
||||
vi_cv_path_mzscheme_pfx=
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: checking if scheme.h can be found in /usr/include/plt/" >&5
|
||||
$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
|
||||
if test -f /usr/include/plt/scheme.h; then
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
SCHEME_INC=/usr/include/plt
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
vi_cv_path_mzscheme_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -4738,21 +4751,34 @@ $as_echo "\"no\"" >&6; }
|
||||
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
MZSCHEME_LIBS="-framework PLT_MzScheme"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
|
||||
else
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
else
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
|
||||
fi
|
||||
if test "$GCC" = yes; then
|
||||
MZSCHEME_LIBS="$MZSCHEME_LIBS -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib"
|
||||
MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib"
|
||||
elif test "`(uname) 2>/dev/null`" = SunOS &&
|
||||
uname -r | grep '^5' >/dev/null; then
|
||||
MZSCHEME_LIBS="$MZSCHEME_LIBS -R ${vi_cv_path_mzscheme_pfx}/lib"
|
||||
MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib"
|
||||
fi
|
||||
fi
|
||||
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
|
||||
SCHEME_COLLECTS=lib/plt/
|
||||
fi
|
||||
MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include${SCHEME_INC} \
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
|
||||
MZSCHEME_EXTRA="mzscheme_base.c"
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
|
||||
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
|
||||
fi
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
|
||||
-DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects\"'"
|
||||
MZSCHEME_SRC="if_mzsch.c"
|
||||
MZSCHEME_OBJ="objects/if_mzsch.o"
|
||||
@@ -4767,6 +4793,8 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
@@ -41,6 +41,8 @@ MZSCHEME_SRC = @MZSCHEME_SRC@
|
||||
MZSCHEME_OBJ = @MZSCHEME_OBJ@
|
||||
MZSCHEME_CFLAGS = @MZSCHEME_CFLAGS@
|
||||
MZSCHEME_PRO = @MZSCHEME_PRO@
|
||||
MZSCHEME_EXTRA = @MZSCHEME_EXTRA@
|
||||
MZSCHEME_MZC = @MZSCHEME_MZC@
|
||||
|
||||
PERL = @vi_cv_path_perl@
|
||||
PERLLIB = @vi_cv_perllib@
|
||||
|
@@ -414,7 +414,7 @@ if test "$enable_mzschemeinterp" = "yes"; then
|
||||
AC_MSG_RESULT("$PLTHOME")
|
||||
vi_cv_path_mzscheme_pfx="$PLTHOME"
|
||||
else
|
||||
AC_MSG_RESULT("not set")
|
||||
AC_MSG_RESULT(not set)
|
||||
dnl -- try to find MzScheme executable
|
||||
AC_PATH_PROG(vi_cv_path_mzscheme, mzscheme)
|
||||
|
||||
@@ -430,14 +430,16 @@ if test "$enable_mzschemeinterp" = "yes"; then
|
||||
if test "X$vi_cv_path_mzscheme" != "X"; then
|
||||
dnl -- find where MzScheme thinks it was installed
|
||||
AC_CACHE_CHECK(MzScheme install prefix,vi_cv_path_mzscheme_pfx,
|
||||
[ vi_cv_path_mzscheme_pfx=`
|
||||
${vi_cv_path_mzscheme} -evm \
|
||||
"(display (simplify-path \
|
||||
dnl different versions of MzScheme differ in command line processing
|
||||
dnl use universal approach
|
||||
echo "(display (simplify-path \
|
||||
(build-path (call-with-values \
|
||||
(lambda () (split-path (find-system-path (quote exec-file)))) \
|
||||
(lambda (base name must-be-dir?) base)) (quote up))))"` ])
|
||||
dnl Remove a trailing slash.
|
||||
vi_cv_path_mzscheme_pfx=`echo "$vi_cv_path_mzscheme_pfx" | sed 's+/$++'`
|
||||
(lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
|
||||
dnl Remove a trailing slash
|
||||
[ vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
|
||||
sed -e 's+/$++'` ])
|
||||
rm -f mzdirs.scm
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -446,16 +448,24 @@ if test "$enable_mzschemeinterp" = "yes"; then
|
||||
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
|
||||
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include)
|
||||
if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
|
||||
AC_MSG_RESULT("yes")
|
||||
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT("no")
|
||||
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/plt/include)
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt)
|
||||
if test -f $vi_cv_path_mzscheme_pfx/include/plt/scheme.h; then
|
||||
AC_MSG_RESULT("yes")
|
||||
SCHEME_INC=/plt
|
||||
AC_MSG_RESULT(yes)
|
||||
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
|
||||
else
|
||||
AC_MSG_RESULT("no")
|
||||
vi_cv_path_mzscheme_pfx=
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(if scheme.h can be found in /usr/include/plt/)
|
||||
if test -f /usr/include/plt/scheme.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
SCHEME_INC=/usr/include/plt
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
vi_cv_path_mzscheme_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -463,23 +473,38 @@ if test "$enable_mzschemeinterp" = "yes"; then
|
||||
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
MZSCHEME_LIBS="-framework PLT_MzScheme"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
|
||||
else
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
|
||||
dnl Using shared objects
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
else
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
|
||||
fi
|
||||
if test "$GCC" = yes; then
|
||||
dnl Make Vim remember the path to the library. For when it's not in
|
||||
dnl $LD_LIBRARY_PATH.
|
||||
MZSCHEME_LIBS="$MZSCHEME_LIBS -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib"
|
||||
MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib"
|
||||
elif test "`(uname) 2>/dev/null`" = SunOS &&
|
||||
uname -r | grep '^5' >/dev/null; then
|
||||
MZSCHEME_LIBS="$MZSCHEME_LIBS -R ${vi_cv_path_mzscheme_pfx}/lib"
|
||||
MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib"
|
||||
fi
|
||||
fi
|
||||
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
|
||||
SCHEME_COLLECTS=lib/plt/
|
||||
fi
|
||||
MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include${SCHEME_INC} \
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
|
||||
dnl need to generate bytecode for MzScheme base
|
||||
MZSCHEME_EXTRA="mzscheme_base.c"
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
|
||||
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
|
||||
fi
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
|
||||
-DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects\"'"
|
||||
MZSCHEME_SRC="if_mzsch.c"
|
||||
MZSCHEME_OBJ="objects/if_mzsch.o"
|
||||
@@ -491,6 +516,8 @@ if test "$enable_mzschemeinterp" = "yes"; then
|
||||
AC_SUBST(MZSCHEME_PRO)
|
||||
AC_SUBST(MZSCHEME_LIBS)
|
||||
AC_SUBST(MZSCHEME_CFLAGS)
|
||||
AC_SUBST(MZSCHEME_EXTRA)
|
||||
AC_SUBST(MZSCHEME_MZC)
|
||||
fi
|
||||
|
||||
|
||||
|
@@ -5866,7 +5866,7 @@ list_equal(l1, l2, ic)
|
||||
return item1 == NULL && item2 == NULL;
|
||||
}
|
||||
|
||||
#if defined(FEAT_PYTHON) || defined(PROTO)
|
||||
#if defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) || defined(PROTO)
|
||||
/*
|
||||
* Return the dictitem that an entry in a hashtable points to.
|
||||
*/
|
||||
|
1353
src/if_mzsch.c
1353
src/if_mzsch.c
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
||||
|
||||
/* #ifdef needed for "make depend" */
|
||||
#ifdef FEAT_MZSCHEME
|
||||
# include <schvers.h>
|
||||
# include <scheme.h>
|
||||
#endif
|
||||
|
||||
@@ -46,4 +47,31 @@
|
||||
# define scheme_byte_string_to_char_string(obj) (obj)
|
||||
#endif
|
||||
|
||||
/* Precise GC macros */
|
||||
#ifndef MZ_GC_DECL_REG
|
||||
# define MZ_GC_DECL_REG(size) /* empty */
|
||||
#endif
|
||||
#ifndef MZ_GC_VAR_IN_REG
|
||||
# define MZ_GC_VAR_IN_REG(x, v) /* empty */
|
||||
#endif
|
||||
#ifndef MZ_GC_ARRAY_VAR_IN_REG
|
||||
# define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) /* empty */
|
||||
#endif
|
||||
#ifndef MZ_GC_REG
|
||||
# define MZ_GC_REG() /* empty */
|
||||
#endif
|
||||
#ifndef MZ_GC_UNREG
|
||||
# define MZ_GC_UNREG() /* empty */
|
||||
#endif
|
||||
|
||||
#ifdef MZSCHEME_FORCE_GC
|
||||
/*
|
||||
* force garbage collection to check all references are registered
|
||||
* seg faults will indicate not registered refs
|
||||
*/
|
||||
# define MZ_GC_CHECK() scheme_collect_garbage();
|
||||
#else
|
||||
# define MZ_GC_CHECK() /* empty */
|
||||
#endif
|
||||
|
||||
#endif /* _IF_MZSCH_H_ */
|
||||
|
@@ -935,8 +935,14 @@ main
|
||||
|
||||
/*
|
||||
* Call the main command loop. This never returns.
|
||||
* For embedded MzScheme the main_loop will be called by Scheme
|
||||
* for proper stack tracking
|
||||
*/
|
||||
#ifndef FEAT_MZSCHEME
|
||||
main_loop(FALSE, FALSE);
|
||||
#else
|
||||
mzscheme_main();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -15,10 +15,6 @@ void mzvim_reset_timer __ARGS((void));
|
||||
void *mzvim_eval_string __ARGS((char_u *str));
|
||||
struct Scheme_Object *mzvim_apply __ARGS((struct Scheme_Object *, int argc,
|
||||
struct Scheme_Object **));
|
||||
int mzthreads_allowed (void);
|
||||
#ifdef FEAT_GUI_KDE
|
||||
void timer_proc (void);
|
||||
void mzscheme_kde_start_timer (void);
|
||||
void mzscheme_kde_stop_timer (void);
|
||||
#endif
|
||||
int mzthreads_allowed __ARGS((void));
|
||||
void mzscheme_main __ARGS((void));
|
||||
/* vim: set ft=c : */
|
||||
|
@@ -676,6 +676,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
191,
|
||||
/**/
|
||||
190,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user