0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

updated for version 7.0006

This commit is contained in:
Bram Moolenaar 2004-07-05 15:58:32 +00:00
parent 592e0a2a1d
commit 325b7a2fb5
44 changed files with 3959 additions and 608 deletions

View File

@ -197,12 +197,15 @@ SRC_UNIX = \
SRC_DOS_UNIX = \
src/if_cscope.c \
src/if_cscope.h \
src/if_mzsch.c \
src/if_mzsch.h \
src/if_perl.xs \
src/if_perlsfio.c \
src/if_python.c \
src/if_ruby.c \
src/if_tcl.c \
src/proto/if_cscope.pro \
src/proto/if_mzsch.pro \
src/proto/if_perl.pro \
src/proto/if_perlsfio.pro \
src/proto/if_python.pro \

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2004 Jun 17
*editing.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -48,6 +48,9 @@ CTRL-G or *CTRL-G* *:f* *:fi* *:file*
make this message shorter. {Vi does not include
column number}
:f[ile]! like |:file|, but don't truncate the name even when
'shortmess' indicates this.
{count}CTRL-G Like CTRL-G, but prints the current file name with
full path. If the count is higher than 1 the current
buffer number is also given. {not in Vi}
@ -69,7 +72,12 @@ g CTRL-G Prints the current position of the cursor in four
{not in VI}
*:file_f*
:f[ile] {name} Sets the current file name to {name}.
:f[ile][!] {name} Sets the current file name to {name}. The optional !
avoids truncating the message, as with |:file|.
:0f[ile][!] Remove the name of the current buffer. The optional !
avoids truncating the message, as with |:file|. {not
in Vi}
:buffers
:files

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -2808,6 +2808,7 @@ mouse_xterm Compiled with support for xterm mouse.
multi_byte Compiled with support for editing Korean et al.
multi_byte_ime Compiled with support for IME input method.
multi_lang Compiled with support for multiple languages.
mzscheme Compiled with MzScheme interface |mzscheme|.
netbeans_intg Compiled with support for |netbeans|.
ole Compiled with OLE automation support for Win32.
os2 OS/2 version of Vim.

View File

@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0aa. Last change: 2004 May 04
*help.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM - main help file
k
@ -148,7 +148,8 @@ GUI ~
|gui_x11.txt| X11 GUI
Interfaces ~
|if_cscop.txt| using cscope with Vim
|if_cscop.txt| using Cscope with Vim
|if_mzsch.txt| MzScheme interface
|if_perl.txt| Perl interface
|if_pyth.txt| Python interface
|if_sniff.txt| SNiFF+ interface
@ -187,6 +188,12 @@ Standard plugins ~
|pi_expl.txt| File explorer
LOCAL ADDITIONS: *local-additions*
|engspchk.txt| English Spelling Checker (v57) May 25, 2004
|example.txt| Example for a locally added help file
|matchit.txt| Extended "%" matching
|test.txt| Testing the hélp cömmånd nôw
|typecorr.txt| Plugin for correcting typing mistakes
|helpp.txt| Dummy line to avoid an error message
------------------------------------------------------------------------------
*bars* Bars example

219
runtime/doc/if_mzsch.txt Normal file
View File

@ -0,0 +1,219 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM REFERENCE MANUAL by Sergey Khorev
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|
{Vi does not have any of these commands}
The MzScheme interface is available only if Vim was compiled with the
|+mzscheme| feature.
Based on the work of Brent Fulgham.
For downloading MzScheme and other info:
http://www.plt-scheme.org/software/mzscheme/
==============================================================================
1. Commands *mzscheme-commands*
*:mzscheme* *:mz*
:[range]mz[scheme] {stmt}
Execute MzScheme statement {stmt}. {not in Vi}
:[range]mz[scheme] << {endmarker}
{script}
{endmarker}
Execute inlined MzScheme script {script}.
Note: This command doesn't work if the MzScheme
feature wasn't compiled in. To avoid errors, see
|script-here|.
*: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
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.
During compilation, the MzScheme interface will remember the current MzScheme
collection path. If you want to specify additional paths use the
'current-library-collection-paths' parameter. E.g., to cons the user-local
MzScheme collection path: >
:mz << EOF
(current-library-collection-paths
(cons
(build-path (find-system-path 'addon-dir) (version) "collects")
(current-library-collection-paths)))
EOF
<
All functionality is provided through module vimext.
The exn:vim is available without explicit import.
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.
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)
<
The global namespace just instantiated this module with the prefix "vimext:".
==============================================================================
2. Examples *mzscheme-examples*
>
:mzscheme (display "Hello")
:mzscheme (vim-set-buff-line 10 "This is line #10")
<
Inline script usage: >
function! <SID>SetFirstLine()
:mz << EOF
(display "!!!")
(vim-set-buff-line 1 "This is line #1")
(vim-beep)
EOF
endfunction
nmap <F9> :call <SID>SetFirstLine() <CR>
<
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)))
<
==============================================================================
3. Threads *mzscheme-threads*
The MzScheme interface supports threads. They are independent from OS threads,
thus scheduling is required. The option 'mzquantum' determines how often
Vim should poll for available MzScheme threads.
NOTE
Thread scheduling in the console version of Vim is less reliable than in the
GUI version.
==============================================================================
5. VIM Functions *mzscheme-vim*
*mzscheme-vimext*
The 'vimext' module provides access to procedures defined in the MzScheme
interface.
Common
------
(command {command-string}) Perform the vim ":Ex" style command.
(eval {expr-string}) Evaluate the vim command string.
NOTE clashes with MzScheme eval
(range-start) Start/End of the range passed with
(range-end) the Scheme command.
(beep) beep
(get-option {option-name} [buffer-or-window]) Get Vim option value (either
local or global, see set-option).
(set-option {string} [buffer-or-window])
Set a Vim option. String must have option
setting form (like optname=optval, or
optname+=optval, etc.) When called with
{buffer} or {window} the local option will
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*
-------
(buff? {object}) Is object a buffer?
(buff-valid? {object}) Is object a valid buffer? (i.e.
corresponds to the real Vim buffer)
(get-buff-line {linenr} [buffer])
Get line from a buffer.
(set-buff-line {linenr} {string} [buffer])
Set a line in a buffer. If {string} is #f,
the line gets deleted. The [buffer]
argument is optional. If omitted, the
current buffer will be used.
(get-buff-line-list {start} {end} [buffer])
Get a list of lines in a buffer. {Start}
and {end} are 1-based. {Start} is
inclusive, {end} - exclusive.
(set-buff-line-list {start} {end} {string-list} [buffer])
Set a list of lines in a buffer. If
string-list is #f or null, the lines get
deleted. If a list is shorter than
{end}-{start} the remaining lines will
be deleted.
(get-buff-name [buffer]) Get a buffer's text name.
(get-buff-num [buffer]) Get a buffer's number.
(get-buff-size [buffer]) Get buffer line count.
(insert-buff-line-list {linenr} {string/string-list} [buffer])
Insert a list of lines into a buffer after
{linenr}. If {linenr} is 0, lines will be
inserted at start.
(curr-buff) Get the current buffer. Use procedures
from `vimcmd' module to change it.
(buff-count) Get count of total buffers in the editor.
(get-next-buff [buffer]) Get next buffer.
(get-prev-buff [buffer]) Get previous buffer. Return #f when there
are no more buffers.
(open-buff {filename}) Open a new buffer (for file "name")
(get-buff-by-name {buffername}) Get a buffer by its filename or #f
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*
------
(win? {object}) Is object a window?
(win-valid? {object}) Is object a valid window (i.e. corresponds
to the real Vim window)?
(curr-win) Get the current window.
(win-count) Get count of windows.
(get-win-num [window]) Get window number.
(get-win-by-num {windownum}) Get window by its number.
(get-win-buffer [window]) Get the buffer for a given window.
(get-win-height [window])
(set-win-height {height} [window]) Get/Set height of window.
(get-win-width [window])
(set-win-width {width} [window])Get/Set width of window.
(get-win-list [buffer]) Get list of windows for a buffer.
(get-cursor [window]) Get cursor position in a window as
a pair (linenr . column).
(set-cursor (line . col) [window]) Set cursor position.
======================================================================
vim:tw=78:ts=8:sts=4:ft=help:norl:

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
*index.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1352,6 +1352,7 @@ The commands are sorted on the non-optional part of their name.
|:stop| :st[op] suspend the editor or escape to a shell
|:stag| :sta[g] split window and jump to a tag
|:startinsert| :star[tinsert] start Insert mode
|:startreplace| :startr[eplace] start Replace mode
|:stopinsert|| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window
|:stselect| :sts[elect] do ":tselect" and split window

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
*insert.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -991,6 +991,19 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
typing <Esc> in Insert mode.
Can be used in an autocommand, example: >
:au BufEnter scratch stopinsert
<
*replacing-ex* *:startreplace*
:startr[eplace][!] Start Replace mode just after executing this command.
Works just like typing "R" in Normal mode. When the
! is included it acts just like "$R" had been typed
(ie. begin replace mode at the end-of-line). Other-
wise replacement begins at the cursor position.
Note that when using this command in a function or
script that the replacement will only start after
the function or script is finished.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
==============================================================================
10. Inserting a file *inserting-file*

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -4235,6 +4235,15 @@ A jump table for the options with a short description can be found at |Q_op|.
time in msec between two mouse clicks for the second click to be
recognized as a multi click.
*'mzquantum'* *'mzq'*
'mzquantum' 'mzq' number (default 100)
global
{not in Vi}
{not available when compiled without the |+mzscheme|
feature}
The number of milliseconds between polls for MzScheme threads.
Negative or zero value means no thread scheduling.
*'nrformats'* *'nf'*
'nrformats' 'nf' string (default "octal,hex")
local to buffer
@ -4269,6 +4278,9 @@ A jump table for the options with a short description can be found at |Q_op|.
*'numberwidth'* *'nuw'*
'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8)
local to window
{not in Vi}
{only available when compiled with the |+linebreak|
feature}
Minimal number of columns to use for the line number. Only relevant
when the 'number' option is set.
Since one space is always between the number and the text, there is

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -255,6 +255,7 @@ These only work when 'wrap' is off:
|o| N o open a new line below the current line, append text (N times)
|O| N O open a new line above the current line, append text (N times)
|:startinsert| :star[tinsert][!] start Insert mode, append when [!] used
|:startreplace| :startr[eplace][!] start Replace mode, at EOL when [!] used
in Visual block mode:
|v_b_I| I insert the same text in front of all the selected lines
@ -762,6 +763,7 @@ Short explanation of each option: *option-list*
|'mousemodel'| |'mousem'| changes meaning of mouse buttons
|'mouseshape'| |'mouses'| shape of the mouse pointer in different modes
|'mousetime'| |'mouset'| max time between mouse double-click
|'mzquantum'| |'mzq'| the interval between polls for MzScheme threads
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|'number'| |'nu'| print the line number in front of each line
|'numberwidth'| |'nuw'| number of columns used for the line number

View File

@ -377,6 +377,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'mousetime' options.txt /*'mousetime'*
'mp' options.txt /*'mp'*
'mps' options.txt /*'mps'*
'mzq' options.txt /*'mzq'*
'mzquantum' options.txt /*'mzquantum'*
'nf' options.txt /*'nf'*
'noacd' options.txt /*'noacd'*
'noai' options.txt /*'noai'*
@ -1038,6 +1040,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+multi_byte various.txt /*+multi_byte*
+multi_byte_ime various.txt /*+multi_byte_ime*
+multi_lang various.txt /*+multi_lang*
+mzscheme various.txt /*+mzscheme*
+netbeans_intg various.txt /*+netbeans_intg*
+ole various.txt /*+ole*
+osfiletype various.txt /*+osfiletype*
@ -2076,6 +2079,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:mod term.txt /*:mod*
:mode term.txt /*:mode*
:move change.txt /*:move*
:mz if_mzsch.txt /*:mz*
:mzf if_mzsch.txt /*:mzf*
:mzfile if_mzsch.txt /*:mzfile*
:mzscheme if_mzsch.txt /*:mzscheme*
:n editing.txt /*:n*
:ne editing.txt /*:ne*
:new windows.txt /*:new*
@ -2338,6 +2345,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:star repeat.txt /*:star*
:start insert.txt /*:start*
:startinsert insert.txt /*:startinsert*
:startreplace insert.txt /*:startreplace*
:stj tagsrch.txt /*:stj*
:stjump tagsrch.txt /*:stjump*
:stop starting.txt /*:stop*
@ -3617,6 +3625,7 @@ Mark motion.txt /*Mark*
MiNT os_mint.txt /*MiNT*
MorphOS os_amiga.txt /*MorphOS*
Motif gui_x11.txt /*Motif*
MzScheme if_mzsch.txt /*MzScheme*
N pattern.txt /*N*
N% motion.txt /*N%*
N: cmdline.txt /*N:*
@ -5080,6 +5089,7 @@ iconize starting.txt /*iconize*
iconv() eval.txt /*iconv()*
ident-search tips.txt /*ident-search*
if_cscop.txt if_cscop.txt /*if_cscop.txt*
if_mzsch.txt if_mzsch.txt /*if_mzsch.txt*
if_ole.txt if_ole.txt /*if_ole.txt*
if_perl.txt if_perl.txt /*if_perl.txt*
if_pyth.txt if_pyth.txt /*if_pyth.txt*
@ -5371,6 +5381,14 @@ myscriptsfile syntax.txt /*myscriptsfile*
mysyntaxfile syntax.txt /*mysyntaxfile*
mysyntaxfile-add syntax.txt /*mysyntaxfile-add*
mysyntaxfile-replace syntax.txt /*mysyntaxfile-replace*
mzscheme if_mzsch.txt /*mzscheme*
mzscheme-buffer if_mzsch.txt /*mzscheme-buffer*
mzscheme-commands if_mzsch.txt /*mzscheme-commands*
mzscheme-examples if_mzsch.txt /*mzscheme-examples*
mzscheme-threads if_mzsch.txt /*mzscheme-threads*
mzscheme-vim if_mzsch.txt /*mzscheme-vim*
mzscheme-vimext if_mzsch.txt /*mzscheme-vimext*
mzscheme-window if_mzsch.txt /*mzscheme-window*
n pattern.txt /*n*
nasm-syntax syntax.txt /*nasm-syntax*
nasm.vim syntax.txt /*nasm.vim*
@ -5746,6 +5764,7 @@ rename-files tips.txt /*rename-files*
repeat.txt repeat.txt /*repeat.txt*
repeating repeat.txt /*repeating*
replacing change.txt /*replacing*
replacing-ex insert.txt /*replacing-ex*
resolve() eval.txt /*resolve()*
restore-position tips.txt /*restore-position*
restricted-mode starting.txt /*restricted-mode*

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,31 +30,9 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Docs for 'numberwidth'. index. optwin.vim
For version 7.0:
- Include many PATCHES:
7 Be able to call a function while passing on a variable number of
arguments:
:function Foo(abc, ...)
: call Bar(a:abc, a:*)
Charles Campbell has a patch for this
He lost the patch himself.
7 Make ":startinsert" command work directly for functions and scripts?
Also make it possible to append (it's difficult at end of line).
And add ":startreplace" (patch by Charles Campbell, 2004 Jan 9,
http://www.erols.com/astronaut/vim/index.html#Patch)
Update 2004 June 18
8 Add patch from Charles Campbell to have ":0file!" remove the name of
the current buffer. (2003 June 17)
Lost the patch himself.
8 Make it possible to delete marks. Charles Campbell has a patch that
does this with the markclear() function (2004 Jan 9). And the
":delmark" command (2004 Feb 9)
Update 2004 June 18
8 ":hardcopy":
- Patch to append CTRL-D to PostScript output (Mike Williams, 2004 Jun
14)
- support printing multi-byte characters. Patch from Motonobu
Ichimura. New (better) patch from Mike Williams (2004 Jan 20)
Updated patch: http://www.eandem.co.uk/mrw/vim/special/index.html
@ -88,6 +66,13 @@ For version 7.0:
Update 2004 Jun 17
Missing docs. Search in 'runtimepath'?
How to get the messages into the .po files?
8 Make it possible to delete marks. Charles Campbell has a patch that
does this with the markclear() function (2004 Jan 9).
And the ":delmark" command (2004 Feb 9)
http://mysite.verizon.net/astronaut/vim/index.html#Patch
~/tmp/ptch.delmark.bz2
~/tmp/ptch.markclear
Implement setmark(markname, lnum, col [, filename]) instead?
--- responses above --
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
@ -206,6 +191,7 @@ For version 7.0:
- In the kvim/KDE source files fix the formatting.
- KDE version is called "kvim". Make it "gvim", like the others?
- Better configure check for KDE include files from Dan Sharp.
- KDE Input method patch. (Yasuhiro Matsumoto)
- Change ga_room into ga_maxlen, so that it doesn't need to be
incremented/decremented each time.
- For string variables, use length instead of NUL termination.
@ -274,8 +260,6 @@ For version 7.0:
- Mac: Unicode input and display (Eckehard Berns, June 27)
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
New patch 2004 Jun 16
7 Add the MzScheme interface? New patch 2004 Jul 2. (Sergey Khorev)
Also fix a few Lisp problems.
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
set highlighting with "CursorColumn" group. Useful for aligning text.
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
@ -283,6 +267,8 @@ For version 7.0:
instead.
Alternative: when 'number' is set highlight the number of the current
line.
7 Make ":startinsert" command work directly for functions and scripts?
Also make it possible to append (it's difficult at end of line).
Vi incompatibility:
8 With undo/redo only marks in the changed lines should be changed. Other

View File

@ -306,6 +306,7 @@ N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
B *+multi_byte* Korean and other languages |multibyte|
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme|
m *+netbeans_intg* |netbeans|
m *+ole* Win32 GUI only: |ole-interface|
*+osfiletype* Support for the 'osfiletype' option and filetype

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 03
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -18,6 +18,7 @@ INCOMPATIBLE CHANGES |incompatible-7|
NEW FEATURES |new-7|
New data types |new-data-types|
KDE support |new-KDE|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@ -64,13 +65,21 @@ Many functions and commands have been added to support the new types.
NOT IMPLEMENTED YET!
KDE support *new-kde*
KDE support *new-KDE*
-----------
Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
MzScheme interface *new-MzScheme*
------------------
The MzScheme interpreter is supported. |MzScheme|
The |:mzscheme| command can be used to execute MzScheme commands.
The |:mzfile| command can be used to execute an MzScheme script file.
Various new items *new-items-7*
-----------------
@ -88,11 +97,17 @@ Options: ~
Used for the a", a' and a` text objects. |a'|
'numberwidth' Minimal width of the space used for the 'number'
option. (Emmanuel Renieris)
'mzquantum' Time in msec to schedule MzScheme threads.
Ex commands: ~
Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
:startreplace Start Replace mode. (Charles Campbell)
:0file Removes the name of the buffer. (Charles Campbell)
New functions: ~
@ -139,6 +154,11 @@ it. (Johannes Zellner)
Added "nbsp" in 'listchars'. (David Blanchet)
For lisp indenting and matching parenthesis: (Sergey Khorev)
- square brackets are recognized properly
- #\(, #\), #\[ and #\] are recognized as character literals
- Lisp line comments (delimited by semicolon) are recognized
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@ -196,4 +216,7 @@ fields. (Walter Briscoe)
On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
Michele)
Printing with PostScript may keep the printer waiting for more. Append a
CTRL-D to the printer output. (Mike Williams)
vim:tw=78:ts=8:ft=help:norl:

View File

@ -1147,6 +1147,10 @@ call append("$", "\t(local to buffer)")
call <SID>BinOptionL("bl")
call append("$", "debug\tset to \"msg\" to see all error messages")
call append("$", " \tset debug=" . &debug)
if has("mzscheme")
call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads")
call append("$", " \tset mzq=" . &mzq)
endif
set cpo&vim

View File

@ -1,6 +1,6 @@
%!PS-Adobe-3.0 Resource-ProcSet
%%Title: VIM-Prolog
%%Version: 1.3 1
%%Version: 1.4 1
%%EndComments
% Editing of this file is NOT RECOMMENDED. You run a very good risk of causing
% all PostScript printing from VIM failing if you do. PostScript is not called
@ -36,5 +36,6 @@ put}{pop pop}ifelse}forall/Encoding findresource dup length 256 eq{NFD/Encoding
ifelse 2 copy known{2 copy get dup maxlength dict copy[/questiondown/space]{2
copy known{2 copy get 2 index/.notdef 3 -1 roll put pop exit}if pop}forall put
}{pop pop}ifelse dup NFD/FontName 3 -1 roll put NFD definefont pop end}bd
(\004)cvn{}bd
% vim:ff=unix:
%%EOF

View File

@ -106,6 +106,21 @@ PERLLIB=$(PERL)/lib
PERLLIBS=$(PERLLIB)/Core
endif
# uncomment 'MZSCHEME' if you want a MzScheme-enabled version
#MZSCHEME=d:/plt
ifdef MZSCHEME
ifndef MZSCHEME_VER
MZSCHEME_VER=205_000
endif
# the modern MinGW can dynamically link to dlls directly
# point MZSCHEME_LIBDIR to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
# c:/windows/system32 isn't a good idea, use some other dir;
# to build you can put them in temp dir)
ifndef MZSCHEME_LIBDIR
MZSCHEME_LIBDIR=$(MZSCHEME)
endif
endif
# Python support -- works with the ActiveState python 2.0 release (and others
# too, probably)
#
@ -252,6 +267,10 @@ CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
endif
endif
ifdef MZSCHEME
CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
endif
ifdef RUBY
CFLAGS += -DFEAT_RUBY $(RUBYINC)
ifeq (yes, $(DYNAMIC_RUBY))
@ -372,6 +391,10 @@ OBJ = \
ifdef PERL
OBJ += $(OUTDIR)/if_perl.o
endif
ifdef MZSCHEME
OBJ += $(OUTDIR)/if_mzsch.o
MZSCHEME_INCL = if_mzsch.h
endif
ifdef PYTHON
OBJ += $(OUTDIR)/if_python.o
endif
@ -401,15 +424,19 @@ endif
endif
ifdef MZSCHEME
MZSCHEME_SUFFIX = Z
endif
ifeq ($(GUI),yes)
TARGET := gvim$(DEBUG_SUFFIX).exe
DEFINES += $(DEF_GUI)
OBJ += $(GUIOBJ)
LFLAGS += -mwindows
OUTDIR = gobj$(DEBUG_SUFFIX)
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
else
TARGET := vim$(DEBUG_SUFFIX).exe
OUTDIR = obj$(DEBUG_SUFFIX)
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
endif
ifdef GETTEXT
@ -432,6 +459,10 @@ LIB += -lperl$(PERL_VER)
endif
endif
ifdef MZSCHEME
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
ifdef TCL
LIB += -L$(TCL)/lib
ifeq (yes, $(DYNAMIC_TCL))
@ -479,7 +510,7 @@ uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
$(TARGET): $(OUTDIR) $(OBJ)
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(PYTHONLIB) $(RUBYLIB)
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -L $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)
upx: exes
upx gvim.exe

View File

@ -19,6 +19,7 @@
# DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
# is yes)
# Global IME support: GIME=yes (requires GUI=yes)
# MzScheme interface: MZSCHEME=[Path to MzScheme directory], MZSCHEME_VER=[version, 205_000, ...]
# Perl interface:
# PERL=[Path to Perl directory]
# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
@ -116,6 +117,9 @@ OBJDIR = .\ObjC
!if "$(OLE)" == "yes"
OBJDIR = $(OBJDIR)O
!endif
!ifdef MZSCHEME
OBJDIR = $(OBJDIR)Z
!endif
!if "$(DEBUG)" == "yes"
OBJDIR = $(OBJDIR)d
!endif
@ -487,6 +491,17 @@ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
!endif
!endif
# MzScheme interface
!ifdef MZSCHEME
!message MzScheme requested - root dir is "$(MZSCHEME)"
!ifndef MZSCHEME_VER
MZSCHEME_VER = 205_000
!endif
CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
!endif
# Perl interface
!ifdef PERL
!ifndef PERL_VER
@ -607,15 +622,15 @@ conflags = $(conflags) /map /mapinfo:lines
LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
$(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) $(TCL_LIB) \
$(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) $(TCL_LIB) \
$(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
all: $(VIM) vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvimext.dll
$(VIM): $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
$(VIM): $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
$(CC) $(CFLAGS) version.c /Fo$(OUTDIR)/version.obj $(PDB)
$(link) $(LINKARGS1) -out:$*.exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
$(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
$(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
$(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \
$(OUTDIR)\version.obj $(LINKARGS2)
@ -747,6 +762,9 @@ $(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 /Fo$(OUTDIR)/if_perlsfio.obj $(PDB)
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL)
$(CC) $(CFLAGS) $(PERL_INC) if_mzsch.c /Fo$(OUTDIR)/if_mzsch.obj $(PDB) -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
$(CC) $(CFLAGS) $(PYTHON_INC) if_python.c /Fo$(OUTDIR)/if_python.obj $(PDB)
@ -840,7 +858,7 @@ auto/pathdef.c: auto
@echo #include "vim.h" >> auto\pathdef.c
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> auto\pathdef.c
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> auto\pathdef.c
@echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS)"; >> auto\pathdef.c
@echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\)"; >> auto\pathdef.c
@echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> auto\pathdef.c
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> auto\pathdef.c
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> auto\pathdef.c

View File

@ -354,7 +354,7 @@ CClink = $(CC)
# Darwin. None of the Mac specific options or files will be used.
#CONF_OPT_DARWIN = --disable-darwin
# PERL - For creating Vim with Perl interface
# PERL
# Uncomment this when you want to include the Perl interface.
# The Perl option sometimes causes problems, because it adds extra flags
# to the command line. If you see strange flags during compilation, check in
@ -365,19 +365,27 @@ CClink = $(CC)
# This requires at least "small" features, "tiny" doesn't work.
#CONF_OPT_PERL = --enable-perlinterp
# PYTHON - For creating Vim with Python interface
# PYTHON
# Uncomment this when you want to include the Python interface.
#CONF_OPT_PYTHON = --enable-pythoninterp
# TCL - For creating Vim with Tcl interface
# TCL
# Uncomment this when you want to include the Tcl interface.
#CONF_OPT_TCL = --enable-tclinterp
# RUBY - For creating Vim with Ruby interface
# RUBY
# Uncomment this when you want to include the Ruby interface.
#CONF_OPT_RUBY = --enable-rubyinterp
# CSCOPE - For creating Vim with Cscope interface
# MZSCHEME
# Uncomment this when you want to include the MzScheme interface.
#CONF_OPT_MZSCHEME = --enable-mzschemeinterp
# PLT/mrscheme/drscheme Home dir; the PLTHOME environment variable also works
#CONF_OPT_PLTHOME = --with-plthome=/usr/local/plt
#CONF_OPT_PLTHOME = --with-plthome=/usr/local/drscheme
#CONF_OPT_PLTHOME = --with-plthome=/home/me/mz
# CSCOPE
# Uncomment this when you want to include the Cscope interface.
#CONF_OPT_CSCOPE = --enable-cscope
@ -1047,7 +1055,7 @@ KDE_DIR = $(KDE_PREFIX)
KDE_INCL = gui.h
KDE_SRC = gui.c pty.c gui_kde.cc gui_kde_x11.cc gui_kde_widget.cc gui_kde_widget_moc.cc kvim_iface_skel.cc
KDE_OBJ = objects/gui.o objects/pty.o objects/gui_kde.o objects/gui_kde_x11.o \
objects/gui_kde_widget.o objects/gui_kde_widget_moc.o \
objects/gui_kde_widget.o objects/gui_kde_widget_moc.o \
objects/kvim_iface_skel.o
KDE_DEFS = -DFEAT_GUI_KDE $(NARROW_PROTO)
KDE_IPATH = $(GUI_INC_LOC)
@ -1245,7 +1253,7 @@ SHELL = /bin/sh
.SUFFIXES: .cc .c .o .pro
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
POST_DEFS = $(X_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(TCL_CFLAGS) $(RUBY_CFLAGS) $(EXTRA_DEFS)
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(TCL_CFLAGS) $(RUBY_CFLAGS) $(EXTRA_DEFS)
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS)
@ -1256,7 +1264,7 @@ DEPEND_CFLAGS = -DPROTO -DDEPEND -DFEAT_GUI $(LINT_CFLAGS)
PFLAGS = $(PROTO_FLAGS) -DPROTO $(LINT_CFLAGS)
ALL_LIB_DIRS = $(GUI_LIBS_DIR) $(X_LIBS_DIR)
ALL_LIBS = $(GUI_LIBS1) $(GUI_X_LIBS) $(GUI_LIBS2) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS) $(PERL_LIBS) $(PYTHON_LIBS) $(TCL_LIBS) $(RUBY_LIBS) $(PROFILE_LIBS)
ALL_LIBS = $(GUI_LIBS1) $(GUI_X_LIBS) $(GUI_LIBS2) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS) $(MZSCHEME_LIBS) $(PERL_LIBS) $(PYTHON_LIBS) $(TCL_LIBS) $(RUBY_LIBS) $(PROFILE_LIBS)
# abbreviations
DEST_BIN = $(DESTDIR)$(BINDIR)
@ -1334,14 +1342,15 @@ BASIC_SRC = \
window.c \
$(OS_EXTRA_SRC)
SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) $(PERL_SRC) $(PYTHON_SRC) \
$(TCL_SRC) $(RUBY_SRC) $(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC)
SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) $(MZSCHEME_SRC) \
$(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(RUBY_SRC) \
$(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC)
TAGS_SRC = *.c *.cpp *.cc if_perl.xs
EXTRA_SRC = hangulin.c auto/if_perl.c if_perlsfio.c if_python.c if_tcl.c \
if_ruby.c if_sniff.c gui_beval.c \
workshop.c wsdebug.c integration.c netbeans.c
EXTRA_SRC = hangulin.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
if_python.c if_tcl.c if_ruby.c if_sniff.c gui_beval.c \
workshop.c wsdebug.c integration.c netbeans.c
# All sources, also the ones that are not configured
ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(EXTRA_SRC)
@ -1399,6 +1408,7 @@ OBJ = \
objects/undo.o \
objects/window.o \
$(GUI_OBJ) \
$(MZSCHEME_OBJ) \
$(PERL_OBJ) \
$(PYTHON_OBJ) \
$(TCL_OBJ) \
@ -1488,7 +1498,7 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
$(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) $(CONF_OPT_WORKSHOP) \
$(CONF_OPT_SNIFF) $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
$(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
$(CONF_ARGS)
$(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME)
# Use "make reconfig" to rerun configure without cached values.
# When config.h changes, most things will be recompiled automatically.
@ -2281,6 +2291,9 @@ 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
$(CCC) -o $@ if_mzsch.c
objects/if_perl.o: auto/if_perl.c
$(CCC) -o $@ auto/if_perl.c
@ -2757,6 +2770,10 @@ objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h proto/gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h proto/gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h proto/gui_beval.pro option.h ex_cmds.h proto.h \

1231
src/auto/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -575,6 +575,9 @@ free_buffer(buf)
buf_T *buf;
{
free_buffer_stuff(buf, TRUE);
#ifdef FEAT_MZSCHEME
mzscheme_buffer_free(buf);
#endif
#ifdef FEAT_PERL
perl_buf_free(buf);
#endif

View File

@ -271,6 +271,9 @@
/* Define if you want huge features. */
#undef FEAT_HUGE
/* Define if you want to include the MzScheme interpreter. */
#undef FEAT_MZSCHEME
/* Define if you want to include the Perl interpreter. */
#undef FEAT_PERL

View File

@ -35,6 +35,12 @@ X_PRE_LIBS = @X_PRE_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIB@
MZSCHEME_LIBS = @MZSCHEME_LIBS@
MZSCHEME_SRC = @MZSCHEME_SRC@
MZSCHEME_OBJ = @MZSCHEME_OBJ@
MZSCHEME_CFLAGS = @MZSCHEME_CFLAGS@
MZSCHEME_PRO = @MZSCHEME_PRO@
PERL = @vi_cv_path_perl@
PERLLIB = @vi_cv_perllib@
PERL_LIBS = @PERL_LIBS@

View File

@ -20,7 +20,7 @@ AC_PROG_AWK dnl required for "make html" in ../doc
dnl Don't strip if we don't have it
AC_CHECK_PROG(STRIP, strip, strip, :)
dnl Check for extention of executables
dnl Check for extension of executables
AC_EXEEXT
dnl Set default value for CFLAGS if none is defined or it's empty
@ -292,6 +292,90 @@ else
AC_MSG_RESULT(yes)
fi
dnl Check for MzScheme feature.
AC_MSG_CHECKING(--enable-mzschemeinterp argument)
AC_ARG_ENABLE(mzschemeinterp,
[ --enable-mzschemeinterp Include MzScheme interpreter.], ,
[enable_mzschemeinterp="no"])
AC_MSG_RESULT($enable_mzschemeinterp)
if test "$enable_mzschemeinterp" = "yes"; then
dnl -- find the mzscheme executable
AC_SUBST(vi_cv_path_mzscheme)
AC_MSG_CHECKING(--with-plthome argument)
AC_ARG_WITH(plthome,
[ --with-plthome=PLTHOME Use PLTHOME.],
with_plthome="$withval"; AC_MSG_RESULT($with_plthome),
with_plthome="";AC_MSG_RESULT("no"))
if test "X$with_plthome" != "X"; then
vi_cv_path_mzscheme_pfx="$with_plthome"
else
AC_MSG_CHECKING(PLTHOME environment var)
if test "X$PLTHOME" != "X"; then
AC_MSG_RESULT("$PLTHOME")
vi_cv_path_mzscheme_pfx="$PLTHOME"
else
AC_MSG_RESULT("not set")
dnl -- try to find MzScheme executable
AC_PATH_PROG(vi_cv_path_mzscheme, mzscheme)
dnl resolve symbolic link, the executable is often elsewhere and there
dnl are no links for the include files.
if test "X$vi_cv_path_mzscheme" != "X"; then
lsout=`ls -l $vi_cv_path_mzscheme`
if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
fi
fi
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 \
(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+/$++'`
fi
fi
fi
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")
else
AC_MSG_RESULT("no")
vi_cv_path_mzscheme_pfx=
fi
fi
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a ${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"
else
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzgc -lmzscheme"
fi
MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include \
-DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/collects\"'"
MZSCHEME_SRC="if_mzsch.c"
MZSCHEME_OBJ="objects/if_mzsch.o"
MZSCHEME_PRO="if_mzsch.pro"
AC_DEFINE(FEAT_MZSCHEME)
fi
AC_SUBST(MZSCHEME_SRC)
AC_SUBST(MZSCHEME_OBJ)
AC_SUBST(MZSCHEME_PRO)
AC_SUBST(MZSCHEME_LIBS)
AC_SUBST(MZSCHEME_CFLAGS)
fi
AC_MSG_CHECKING(--enable-perlinterp argument)
AC_ARG_ENABLE(perlinterp,
[ --enable-perlinterp Include Perl interpreter.], ,
@ -1187,18 +1271,18 @@ AC_ARG_WITH(qt-dir,
])
if test "x$ROOTQT" = "x"; then
if test -z "$QTDIR"; then
dnl Find the Qt directory by looking for the "moc" program.
dnl It's better than nothing.
AC_PATH_PROG(MOC, moc, no)
if text"x$MOC" = "x"; then
AC_MSG_ERROR(could not find Qt directory)
else
ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
fi
else
ROOTQT="$QTDIR"
fi
if test -z "$QTDIR"; then
dnl Find the Qt directory by looking for the "moc" program.
dnl It's better than nothing.
AC_PATH_PROG(MOC, moc, no)
if test "x$MOC" = "xno"; then
AC_MSG_ERROR(could not find Qt directory)
else
ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
fi
else
ROOTQT="$QTDIR"
fi
fi
MOC="$ROOTQT"/bin/moc
QT_INCLUDES="$ROOTQT"/include
@ -1238,6 +1322,23 @@ dnl so, first, look up at the kde-config script
dnl ------------------
if test -z "$SKIP_KDE"; then
AC_DEFUN([AC_FIND_FILE],
[
$3=NO
for i in $2;
do
for j in $1;
do
echo "configure: __oline__: $i/$j" >&AC_FD_CC
if test -r "$i/$j"; then
echo "taking that" >&AC_FD_CC
$3=$i
break 2
fi
done
done
])
AC_DEFUN(AM_PATH_KDE,
[
if test "X$KDE_CONFIG" != "X"; then
@ -1247,7 +1348,7 @@ AC_DEFUN(AM_PATH_KDE,
if test "$KDE_CONFIG" = "no" ; then
no_kde=yes
else
KDE_PREFIX=`$KDE_CONFIG $kde_config_args --prefix`
KDE_PREFIX=`$KDE_CONFIG --prefix`
if test "x$KDE_LIBS" = "x"; then
KDE_LIBS="$KDE_PREFIX/lib"
fi
@ -1297,6 +1398,7 @@ else
KDE_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(KDE_LIBS)
AC_SUBST(KDE_INCLUDES)
AC_SUBST(KDE_PREFIX)
@ -1339,7 +1441,6 @@ else
fi
if test "x$kde_config_prefix" != "x" ; then
kde_config_args=""
KDE_CONFIG=$kde_config_prefix/bin/kde-config
fi
@ -1391,6 +1492,47 @@ if test "X$KDE_CONFIG" != "X" ; then
dnl GUI_LIB_LOC="`echo $GUI_LIB_LOC\ | sed 's% -L/usr/lib%%'`"
AC_MSG_RESULT(found $qt_major_version.$qt_minor_version in $ROOTQT)
dnl now check the results ...
dnl find the Qt's headers ?
AC_FIND_FILE(qstyle.h,$QT_INCLUDES,qt_incdir)
if test "x$qt_incdir" = "xNO"; then
AC_MSG_ERROR(Could not find Qt headers in $QT_INCLUDES)
fi
AC_FIND_FILE(kapplication.h,$KDE_INCLUDES,kde_incdir)
if test "x$kde_incdir" = "xNO"; then
AC_MSG_ERROR(Could not find KDE headers in $KDE_INCLUDES)
fi
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_LIBS="$LIBS"
LIBS="$GUI_LIB_LOC"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $GUI_INC_LOC"
AC_MSG_CHECKING(whether Qt libraries are usable)
AC_TRY_LINK(
[#include <qapplication.h>],
[
int argc;
char** argv;
QApplication app(argc, argv);]
,AC_MSG_RESULT(yes),AC_MSG_RESULT(no);AC_MSG_ERROR(Qt fails to link a simple application, check your installation and settings))
AC_MSG_CHECKING(whether KDE libraries are usable)
AC_TRY_LINK(
[#include <kapplication.h>],
[
int argc;
char** argv;
KApplication app(argc, argv);]
,AC_MSG_RESULT(yes),AC_MSG_RESULT(no);AC_MSG_ERROR(KDE fails to link a simple application, check your installation and settings))
LIBS="$ac_save_LIBS"
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
SKIP_GTK=YES
SKIP_ATHENA=YES
SKIP_MOTIF=YES
@ -1816,7 +1958,7 @@ if test -z "$SKIP_MOTIF"; then
gui_libs="`echo $x_libraries|sed 's%/[^/][^/]*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
GUI_LIB_LOC=
for try in $gui_libs; do
for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl; do
for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
if test -f "$libtry"; then
GUI_LIB_LOC=$try
fi

View File

@ -4987,6 +4987,9 @@ f_has(argvars, retvar)
#ifdef FEAT_MULTI_LANG
"multi_lang",
#endif
#ifdef FEAT_MZSCHEME
"mzscheme",
#endif
#ifdef FEAT_OLE
"ole",
#endif
@ -9109,6 +9112,8 @@ ex_function(eap)
&& (!ASCII_ISALPHA(p[2]) || p[2] == 'l'))
|| (p[0] == 'r' && p[1] == 'u' && p[2] == 'b'
&& (!ASCII_ISALPHA(p[3]) || p[3] == 'y'))
|| (p[0] == 'm' && p[1] == 'z'
&& (!ASCII_ISALPHA(p[2]) || p[2] == 's'))
))
{
/* ":python <<" continues until a dot, like ":append" */

View File

@ -1998,7 +1998,18 @@ ex_file(eap)
char_u *fname, *sfname, *xfname;
buf_T *buf;
if (*eap->arg != NUL)
/* ":0file" removes the file name. Check for illegal uses ":3file",
* "0file name", etc. */
if (eap->addr_count > 0
&& (*eap->arg != NUL
|| eap->line2 > 0
|| eap->addr_count > 1))
{
EMSG(_(e_invarg));
return;
}
if (*eap->arg != NUL || eap->addr_count == 1)
{
#ifdef FEAT_AUTOCMD
buf = curbuf;

View File

@ -349,7 +349,7 @@ EX(CMD_execute, "execute", ex_execute,
EX(CMD_exit, "exit", ex_exit,
RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN),
EX(CMD_file, "file", ex_file,
BANG|FILE1|TRLBAR),
RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR),
EX(CMD_files, "files", buflist_list,
BANG|TRLBAR|CMDWIN),
EX(CMD_filetype, "filetype", ex_filetype,
@ -512,6 +512,10 @@ EX(CMD_mkview, "mkview", ex_mkrc,
BANG|FILE1|TRLBAR),
EX(CMD_mode, "mode", ex_mode,
WORD1|TRLBAR|CMDWIN),
EX(CMD_mzscheme, "mzscheme", ex_mzscheme,
RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN),
EX(CMD_mzfile, "mzfile", ex_mzfile,
RANGE|FILE1|NEEDARG|CMDWIN),
EX(CMD_next, "next", ex_next,
RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_new, "new", ex_splitview,
@ -736,6 +740,8 @@ EX(CMD_stag, "stag", ex_stag,
RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR),
EX(CMD_startinsert, "startinsert", ex_startinsert,
BANG|TRLBAR|CMDWIN),
EX(CMD_startreplace, "startreplace", ex_startinsert,
BANG|TRLBAR|CMDWIN),
EX(CMD_stopinsert, "stopinsert", ex_stopinsert,
BANG|TRLBAR|CMDWIN),
EX(CMD_stjump, "stjump", ex_stag,

View File

@ -3811,8 +3811,9 @@ struct prt_ps_resource_S
*
* VIM Prolog
* 6.2 1.3
* 7.0 1.4
*/
#define PRT_PROLOG_VERSION ((char_u *)"1.3")
#define PRT_PROLOG_VERSION ((char_u *)"1.4")
/* String versions of PS resource types - indexed by constants above so don't
* re-order!
@ -5116,6 +5117,10 @@ mch_print_end(psettings)
prt_dsc_noarg("EOF");
/* Write CTRL-D to close serial communication link if used.
* NOTHING MUST BE WRITTEN AFTER THIS! */
prt_write_file(IF_EB("\004", "\067"));
if (!prt_file_error && psettings->outfile == NULL
&& !got_int && !psettings->user_abort)
{

View File

@ -128,7 +128,7 @@ static int getargopt __ARGS((exarg_T *eap));
static int check_more __ARGS((int, int));
static linenr_T get_address __ARGS((char_u **, int skip, int to_other_file));
#if !defined(FEAT_PERL) || !defined(FEAT_PYTHON) || !defined(FEAT_TCL) \
|| !defined(FEAT_RUBY)
|| !defined(FEAT_RUBY) || !defined(FEAT_MZSCHEME)
static void ex_script_ni __ARGS((exarg_T *eap));
#endif
static char_u *invalid_range __ARGS((exarg_T *eap));
@ -220,6 +220,10 @@ static void ex_popup __ARGS((exarg_T *eap));
#ifndef FEAT_SYN_HL
# define ex_syntax ex_ni
#endif
#ifndef FEAT_MZSCHEME
# define ex_mzscheme ex_script_ni
# define ex_mzfile ex_ni
#endif
#ifndef FEAT_PERL
# define ex_perl ex_script_ni
# define ex_perldo ex_ni
@ -2389,6 +2393,7 @@ do_one_cmd(cmdlinep, sourcing,
case CMD_let:
case CMD_lockmarks:
case CMD_match:
case CMD_mzscheme:
case CMD_perl:
case CMD_psearch:
case CMD_python:
@ -3807,7 +3812,7 @@ ex_ni(eap)
}
#if !defined(FEAT_PERL) || !defined(FEAT_PYTHON) || !defined(FEAT_TCL) \
|| !defined(FEAT_RUBY)
|| !defined(FEAT_RUBY) || !defined(FEAT_MZSCHEME)
/*
* Function called for script command which is Not Implemented. NI!
* Skips over ":perl <<EOF" constructs.
@ -7980,7 +7985,7 @@ ex_normal(eap)
}
/*
* ":startinsert"
* ":startinsert" and ":startreplace"
*/
static void
ex_startinsert(eap)
@ -7991,11 +7996,17 @@ ex_startinsert(eap)
coladvance((colnr_T)MAXCOL);
curwin->w_curswant = MAXCOL;
curwin->w_set_curswant = FALSE;
restart_edit = 'a';
if (eap->cmdidx == CMD_startinsert)
restart_edit = 'a';
else
restart_edit = 'R';
}
else
{
restart_edit = 'i';
if (eap->cmdidx == CMD_startinsert)
restart_edit = 'i';
else
restart_edit = 'R';
curwin->w_curswant = 0; /* avoid MAXCOL */
}
}

View File

@ -1101,6 +1101,7 @@
/*
* These features can only be included by using a configure argument. See the
* Makefile for a line to uncomment.
* +mzscheme MzScheme interface: "--enable-mzscheme"
* +perl Perl interface: "--enable-perlinterp"
* +python Python interface: "--enable-pythoninterp"
* +tcl TCL interface: "--enable-tclinterp"

2244
src/if_mzsch.c Normal file

File diff suppressed because it is too large Load Diff

45
src/if_mzsch.h Normal file
View File

@ -0,0 +1,45 @@
/* vi:set ts=8 sts=4 sw=4:
*
* MzScheme interface for Vim, wrapper around scheme.h
*/
#ifndef _IF_MZSCH_H_
#define _IF_MZSCH_H_
#ifdef __MINGW32__
/* Hack to engage Cygwin-specific settings */
# define __CYGWIN32__
#endif
#include <scheme.h>
#ifdef __MINGW32__
# undef __CYGWIN32__
#endif
#if MZSCHEME_VERSION_MAJOR >= 299
/* macros to be compatible with 20x versions */
# define scheme_config scheme_current_config()
# define scheme_make_string scheme_make_byte_string
# define scheme_make_string_output_port scheme_make_byte_string_output_port
# define scheme_get_sized_string_output scheme_get_sized_byte_string_output
# define scheme_write_string scheme_write_byte_string
# define scheme_make_sized_string scheme_make_sized_byte_string
# define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj))
# define SCHEME_STR_VAL(obj) SCHEME_BYTE_STR_VAL( \
(SCHEME_BYTE_STRINGP(obj) ? obj : scheme_char_string_to_byte_string(obj)))
# define GUARANTEE_STRING(fname, argnum) GUARANTEE_TYPE(fname, argnum, SCHEME_STRINGP, "string")
# ifdef scheme_format
# undef scheme_format
# endif
# define scheme_format scheme_format_utf8
# define GET_BYTE_STRING(obj) (SCHEME_BYTE_STRINGP(obj) ? obj : \
scheme_char_string_to_byte_string(obj))
#else
# define GET_BYTE_STRING(obj) (obj)
# define SCHEME_BYTE_STRLEN_VAL SCHEME_STRLEN_VAL
# define SCHEME_BYTE_STR_VAL SCHEME_STR_VAL
#endif
#endif /* _IF_MZSCH_H_ */

View File

@ -2277,6 +2277,9 @@ getout(exitval)
windgoto((int)Rows - 1, 0);
#endif
#ifdef FEAT_MZSCHEME
mzscheme_end();
#endif
#ifdef FEAT_TCL
tcl_end();
#endif

View File

@ -7377,11 +7377,13 @@ lisp_match(p)
* - it doesn't know about comments starting with a semicolon
* - it incorrectly interprets '(' as a character literal
* All this messes up get_lisp_indent in some rare cases.
* Update from Sergey Khorev:
* I tried to fix the first two issues.
*/
int
get_lisp_indent()
{
pos_T *pos, realpos;
pos_T *pos, realpos, paren;
int amount;
char_u *that;
colnr_T col;
@ -7395,7 +7397,16 @@ get_lisp_indent()
realpos = curwin->w_cursor;
curwin->w_cursor.col = 0;
if ((pos = findmatch(NULL, '(')) != NULL)
if ((pos = findmatch(NULL, '(')) == NULL)
pos = findmatch(NULL, '[');
else
{
paren = *pos;
pos = findmatch(NULL, '[');
if (pos == NULL || ltp(pos, &paren))
pos = &paren;
}
if (pos != NULL)
{
/* Extra trick: Take the indent of the first previous non-white
* line that is at the same () level. */
@ -7426,9 +7437,9 @@ get_lisp_indent()
while (*that && (*that != '"' || *(that - 1) == '\\'))
++that;
}
if (*that == '(')
if (*that == '(' || *that == '[')
++parencount;
else if (*that == ')')
else if (*that == ')' || *that == ']')
--parencount;
}
if (parencount == 0)
@ -7465,7 +7476,8 @@ get_lisp_indent()
* (...)) of (...))
*/
if (!vi_lisp && *that == '(' && lisp_match(that + 1))
if (!vi_lisp && (*that == '(' || *that == '[')
&& lisp_match(that + 1))
amount += 2;
else
{
@ -7483,7 +7495,7 @@ get_lisp_indent()
{
/* test *that != '(' to accomodate first let/do
* argument if it is more than one line */
if (!vi_lisp && *that != '(')
if (!vi_lisp && *that != '(' && *that != '[')
firsttry++;
parencount = 0;
@ -7499,16 +7511,18 @@ get_lisp_indent()
&& (!vim_iswhite(*that)
|| quotecount
|| parencount)
&& (!(*that == '('
&& (!((*that == '(' || *that == '[')
&& !quotecount
&& !parencount
&& vi_lisp)))
{
if (*that == '"')
quotecount = !quotecount;
if (*that == '(' && !quotecount)
if ((*that == '(' || *that == '[')
&& !quotecount)
++parencount;
if (*that == ')' && !quotecount)
if ((*that == ')' || *that == ']')
&& !quotecount)
--parencount;
if (*that == '\\' && *(that+1) != NUL)
amount += lbr_chartabsize_adv(&that,
@ -7530,7 +7544,7 @@ get_lisp_indent()
}
}
else
amount = 0; /* no matching '(' found, use zero indent */
amount = 0; /* no matching '(' or '[' found, use zero indent */
curwin->w_cursor = realpos;

View File

@ -1538,6 +1538,13 @@ static struct vimoption
{"mousetime", "mouset", P_NUM|P_VI_DEF,
(char_u *)&p_mouset, PV_NONE,
{(char_u *)500L, (char_u *)0L}},
{"mzquantum", "mzq", P_NUM,
#ifdef FEAT_MZSCHEME
(char_u *)&p_mzq, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)100L, (char_u *)100L}},
{"novice", NULL, P_BOOL|P_VI_DEF,
(char_u *)NULL, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
@ -6807,6 +6814,10 @@ set_num_option(opt_idx, varp, value, errbuf, opt_flags)
if (p_uc && !old_value)
ml_open_files();
}
#if defined(FEAT_MZSCHEME) && defined(FEAT_GUI)
else if (pp == &p_mzq)
mzvim_reset_timer();
#endif
/* sync undo before 'undolevels' changes */
else if (pp == &p_ul)
@ -7081,7 +7092,7 @@ findoption(arg)
return opt_idx;
}
#if defined(FEAT_EVAL) || defined(FEAT_TCL)
#if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME)
/*
* Get the value for an option.
*

View File

@ -572,6 +572,9 @@ EXTERN int p_mh; /* 'mousehide' */
EXTERN char_u *p_mousem; /* 'mousemodel' */
EXTERN long p_mouset; /* 'mousetime' */
EXTERN int p_more; /* 'more' */
#ifdef FEAT_MZSCHEME
EXTERN long p_mzq; /* 'mzquantum */
#endif
EXTERN char_u *p_para; /* 'paragraphs' */
EXTERN int p_paste; /* 'paste' */
EXTERN char_u *p_pt; /* 'pastetoggle' */

View File

@ -31,6 +31,10 @@
#include "vim.h"
#ifdef FEAT_MZSCHEME
# include "if_mzsch.h"
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
@ -260,7 +264,8 @@ static struct signalinfo
#ifdef SIGVTALRM
{SIGVTALRM, "VTALRM", TRUE},
#endif
#ifdef SIGPROF
#if defined(SIGPROF) && !defined(FEAT_MZSCHEME)
/* MzScheme uses SIGPROF for its own needs */
{SIGPROF, "PROF", TRUE},
#endif
#ifdef SIGXCPU
@ -520,6 +525,9 @@ mch_delay(msec, ignoreinput)
int ignoreinput;
{
int old_tmode;
#ifdef FEAT_MZSCHEME
long total = msec; /* remember original value */
#endif
if (ignoreinput)
{
@ -534,6 +542,16 @@ mch_delay(msec, ignoreinput)
* Prefer nanosleep(), some versions of usleep() can only sleep up to
* one second.
*/
#ifdef FEAT_MZSCHEME
do
{
/* if total is large enough, wait by portions in p_mzq */
if (total > p_mzq)
msec = p_mzq;
else
msec = total;
total -= msec;
#endif
#ifdef HAVE_NANOSLEEP
{
struct timespec ts;
@ -572,6 +590,10 @@ mch_delay(msec, ignoreinput)
# endif /* HAVE_SELECT */
# endif /* HAVE_NANOSLEEP */
#endif /* HAVE_USLEEP */
#ifdef FEAT_MZSCHEME
}
while (total > 0);
#endif
settmode(old_tmode);
}
@ -4066,7 +4088,7 @@ RealWaitForChar(fd, msec, check_for_gpm)
int *check_for_gpm;
{
int ret;
#if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP)
#if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
static int busy = FALSE;
/* May retry getting characters after an event was handled. */
@ -4081,12 +4103,18 @@ RealWaitForChar(fd, msec, check_for_gpm)
if (msec > 0 && (
# ifdef FEAT_XCLIPBOARD
xterm_Shell != (Widget)0
# ifdef USE_XSMP
# if defined(USE_XSMP) || defined(FEAT_MZSCHEME)
||
# endif
# endif
# ifdef USE_XSMP
xsmp_icefd != -1
# ifdef FEAT_MZSCHEME
||
# endif
# endif
# ifdef FEAT_MZSCHEME
(mzthreads_allowed() && p_mzq > 0)
# endif
))
gettimeofday(&start_tv, NULL);
@ -4104,6 +4132,9 @@ RealWaitForChar(fd, msec, check_for_gpm)
{
#ifdef MAY_LOOP
int finished = TRUE; /* default is to 'loop' just once */
# ifdef FEAT_MZSCHEME
int mzquantum_used = FALSE;
# endif
#endif
#ifndef HAVE_SELECT
struct pollfd fds[5];
@ -4117,7 +4148,16 @@ RealWaitForChar(fd, msec, check_for_gpm)
# ifdef USE_XSMP
int xsmp_idx = -1;
# endif
int towait = (int)msec;
# ifdef FEAT_MZSCHEME
mzvim_check_threads();
if (mzthreads_allowed() && p_mzq > 0 && (msec < 0 || msec > p_mzq))
{
towait = (int)p_mzq; /* don't wait longer than 'mzquantum' */
mzquantum_used = TRUE;
}
# endif
fds[0].fd = fd;
fds[0].events = POLLIN;
nfd = 1;
@ -4159,7 +4199,12 @@ RealWaitForChar(fd, msec, check_for_gpm)
}
# endif
ret = poll(fds, nfd, (int)msec);
ret = poll(fds, nfd, towait);
# ifdef FEAT_MZSCHEME
if (ret == 0 && mzquantum_used)
/* MzThreads scheduling is required and timeout occured */
finished = FALSE;
# endif
# ifdef FEAT_SNIFF
if (ret < 0)
@ -4203,8 +4248,7 @@ RealWaitForChar(fd, msec, check_for_gpm)
xsmp_close();
}
if (--ret == 0)
/* Try again */
finished = FALSE;
finished = FALSE; /* Try again */
}
# endif
@ -4212,9 +4256,19 @@ RealWaitForChar(fd, msec, check_for_gpm)
#else /* HAVE_SELECT */
struct timeval tv;
struct timeval *tvp;
fd_set rfds, efds;
int maxfd;
long towait = msec;
# ifdef FEAT_MZSCHEME
mzvim_check_threads();
if (mzthreads_allowed() && p_mzq > 0 && (msec < 0 || msec > p_mzq))
{
towait = p_mzq; /* don't wait longer than 'mzquantum' */
mzquantum_used = TRUE;
}
# endif
# ifdef __EMX__
/* don't check for incoming chars if not in raw mode, because select()
* always returns TRUE then (in some version of emx.dll) */
@ -4222,11 +4276,14 @@ RealWaitForChar(fd, msec, check_for_gpm)
return 0;
# endif
if (msec >= 0)
if (towait >= 0)
{
tv.tv_sec = msec / 1000;
tv.tv_usec = (msec % 1000) * (1000000/1000);
tv.tv_sec = towait / 1000;
tv.tv_usec = (towait % 1000) * (1000000/1000);
tvp = &tv;
}
else
tvp = NULL;
/*
* Select on ready for reading and exceptional condition (end of file).
@ -4281,7 +4338,12 @@ RealWaitForChar(fd, msec, check_for_gpm)
* required. Should not be used */
ret = 0;
# else
ret = select(maxfd + 1, &rfds, NULL, &efds, (msec >= 0) ? &tv : NULL);
ret = select(maxfd + 1, &rfds, NULL, &efds, tvp);
# endif
# ifdef FEAT_MZSCHEME
if (ret == 0 && mzquantum_used)
/* loop if MzThreads must be scheduled and timeout occured */
finished = FALSE;
# endif
# ifdef FEAT_SNIFF

View File

@ -23,6 +23,10 @@
#include <io.h>
#include "vim.h"
#ifdef FEAT_MZSCHEME
# include "if_mzsch.h"
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
@ -1097,6 +1101,9 @@ WaitForChar(long msec)
*/
for (;;)
{
#ifdef FEAT_MZSCHEME
mzvim_check_threads();
#endif
#ifdef FEAT_CLIENTSERVER
serverProcessPendingMessages();
#endif
@ -1119,14 +1126,20 @@ WaitForChar(long msec)
}
if (msec != 0)
{
DWORD dwWaitTime = dwEndTime - dwNow;
#ifdef FEAT_MZSCHEME
if (mzthreads_allowed() && p_mzq > 0
&& (msec < 0 || (long)dwWaitTime > p_mzq))
dwWaitTime = p_mzq; /* don't wait longer than 'mzquantum' */
#endif
#ifdef FEAT_CLIENTSERVER
/* Wait for either an event on the console input or a message in
* the client-server window. */
if (MsgWaitForMultipleObjects(1, &g_hConIn, FALSE,
dwEndTime - dwNow, QS_SENDMESSAGE) != WAIT_OBJECT_0)
dwWaitTime, QS_SENDMESSAGE) != WAIT_OBJECT_0)
#else
if (WaitForSingleObject(g_hConIn, dwEndTime - dwNow)
!= WAIT_OBJECT_0)
if (WaitForSingleObject(g_hConIn, dwWaitTime) != WAIT_OBJECT_0)
#endif
continue;
}
@ -4106,9 +4119,26 @@ mch_delay(
{
#ifdef FEAT_GUI_W32
Sleep((int)msec); /* never wait for input */
#else
#else /* Console */
if (ignoreinput)
Sleep((int)msec);
# ifdef FEAT_MZSCHEME
if (mzthreads_allowed() && p_mzq > 0 && msec > p_mzq)
{
int towait = p_mzq;
/* if msec is large enough, wait by portions in p_mzq */
while (msec > 0)
{
mzvim_check_threads();
if (msec < towait)
towait = msec;
Sleep(towait);
msec -= towait;
}
}
else
# endif
Sleep((int)msec);
else
WaitForChar(msec);
#endif

View File

@ -146,6 +146,10 @@ void qsort __ARGS((void *base, size_t elm_count, size_t elm_size, int (*cmp)(con
# include "version.pro"
# include "window.pro"
# ifdef FEAT_MZSCHEME
# include "if_mzsch.pro"
# endif
# ifdef FEAT_PYTHON
# include "if_python.pro"
# endif

19
src/proto/if_mzsch.pro Normal file
View File

@ -0,0 +1,19 @@
/* if_mzsch.c */
int mzscheme_enabled __ARGS((int verbose));
void mzscheme_end __ARGS((void));
void ex_mzscheme __ARGS((exarg_T *eap));
void ex_mzfile __ARGS((exarg_T *eap));
void mzscheme_buffer_free __ARGS((buf_T *buf));
void mzscheme_window_free __ARGS((win_T *win));
char *mzscheme_version __ARGS((void));
void raise_vim_exn(const char *add_info);
void raise_if_error __ARGS((void));
buf_T *get_valid_buffer __ARGS((void *));
win_T *get_valid_window __ARGS((void *));
void mzvim_check_threads __ARGS((void));
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);
/* vim: set ft=c : */

View File

@ -1558,6 +1558,10 @@ findmatchlimit(oap, initc, flags, maxtravel)
int match_escaped = 0; /* search for escaped match */
int dir; /* Direction to search */
int comment_col = MAXCOL; /* start of / / comment */
#ifdef FEAT_LISP
int lispcomm = FALSE; /* inside of Lisp-style comment */
int lisp = curbuf->b_p_lisp; /* engage Lisp-specific hacks ;) */
#endif
pos = curwin->w_cursor;
linep = ml_get(pos.lnum);
@ -1822,8 +1826,16 @@ findmatchlimit(oap, initc, flags, maxtravel)
do_quotes = -1;
start_in_quotes = MAYBE;
/* backward search: Check if this line contains a single-line comment */
if (backwards && comment_dir)
if ((backwards && comment_dir)
#ifdef FEAT_LISP
|| lisp
#endif
)
comment_col = check_linecomment(linep);
#ifdef FEAT_LISP
if (lisp && comment_col != MAXCOL && pos.col > (colnr_T)comment_col)
lispcomm = TRUE; /* find match inside this comment */
#endif
while (!got_int)
{
/*
@ -1832,6 +1844,11 @@ findmatchlimit(oap, initc, flags, maxtravel)
*/
if (backwards)
{
#ifdef FEAT_LISP
/* char to match is inside of comment, don't search outside */
if (lispcomm && pos.col < (colnr_T)comment_col)
break;
#endif
if (pos.col == 0) /* at start of line, go to prev. one */
{
if (pos.lnum == 1) /* start of file */
@ -1847,8 +1864,17 @@ findmatchlimit(oap, initc, flags, maxtravel)
line_breakcheck();
/* Check if this line contains a single-line comment */
if (comment_dir)
if (comment_dir
#ifdef FEAT_LISP
|| lisp
#endif
)
comment_col = check_linecomment(linep);
#ifdef FEAT_LISP
/* skip comment */
if (lisp && comment_col != MAXCOL)
pos.col = comment_col;
#endif
}
else
{
@ -1861,9 +1887,22 @@ findmatchlimit(oap, initc, flags, maxtravel)
}
else /* forward search */
{
if (linep[pos.col] == NUL) /* at end of line, go to next one */
if (linep[pos.col] == NUL
/* at end of line, go to next one */
#ifdef FEAT_LISP
/* don't search for match in comment */
|| (lisp && comment_col != MAXCOL
&& pos.col == (colnr_T)comment_col)
#endif
)
{
if (pos.lnum == curbuf->b_ml.ml_line_count) /* end of file */
if (pos.lnum == curbuf->b_ml.ml_line_count /* end of file */
#ifdef FEAT_LISP
/* line is exhausted and comment with it,
* don't search for match in code */
|| lispcomm
#endif
)
break;
++pos.lnum;
@ -1874,6 +1913,10 @@ findmatchlimit(oap, initc, flags, maxtravel)
pos.col = 0;
do_quotes = -1;
line_breakcheck();
#ifdef FEAT_LISP
if (lisp) /* find comment pos in new line */
comment_col = check_linecomment(linep);
#endif
}
else
{
@ -2094,11 +2137,15 @@ findmatchlimit(oap, initc, flags, maxtravel)
default:
#ifdef FEAT_LISP
/* For Lisp skip over backslashed (), {} and []. */
/*
* For Lisp skip over backslashed (), {} and [].
* (actually, we skip #\( et al)
*/
if (curbuf->b_p_lisp
&& vim_strchr((char_u *)"(){}[]", c) != NULL
&& pos.col > 0
&& check_prevcol(linep, pos.col, '\\', NULL))
&& pos.col > 1
&& check_prevcol(linep, pos.col, '\\', NULL)
&& check_prevcol(linep, pos.col - 1, '#', NULL))
break;
#endif
@ -2151,6 +2198,40 @@ check_linecomment(line)
char_u *p;
p = line;
#ifdef FEAT_LISP
/* skip Lispish one-line comments */
if (curbuf->b_p_lisp)
{
if (vim_strchr(p, ';') != NULL) /* there may be comments */
{
int instr = FALSE; /* inside of string */
p = line; /* scan from start */
while ((p = vim_strpbrk(p, "\";")) != NULL)
{
if (*p == '"')
{
if (instr)
{
if (*(p - 1) != '\\') /* skip escaped quote */
instr = FALSE;
}
else if (p == line || ((p - line) >= 2
/* skip #\" form */
&& *(p - 1) != '\\' && *(p - 2) != '#'))
instr = TRUE;
}
else if (!instr && ((p - line) < 2
|| (*(p - 1) != '\\' && *(p - 2) != '#')))
break; /* found! */
++p;
}
}
else
p = NULL;
}
else
#endif
while ((p = vim_strchr(p, '/')) != NULL)
{
if (p[1] == '/')

View File

@ -1209,12 +1209,16 @@ struct file_buffer
int b_shortname; /* this file has an 8.3 file name */
#endif
#ifdef FEAT_MZSCHEME
void *mzscheme_ref; /* The MzScheme reference to this buffer */
#endif
#ifdef FEAT_PERL
void *perl_private;
#endif
#ifdef FEAT_PYTHON
void *python_ref; /* The Python value referring to this buffer */
void *python_ref; /* The Python reference to this buffer */
#endif
#ifdef FEAT_TCL
@ -1591,6 +1595,11 @@ struct window
int w_nrwidth_width; /* nr of chars to print line count. */
#endif
#ifdef FEAT_MZSCHEME
void *mzscheme_ref; /* The MzScheme value referring to this window */
#endif
#ifdef FEAT_PERL
void *perl_private;
#endif

View File

@ -370,6 +370,11 @@ static char *(features[]) =
#else
"-multi_lang",
#endif
#ifdef FEAT_MZSCHEME
"+mzscheme",
#else
"-mzscheme",
#endif
#ifdef FEAT_NETBEANS_INTG
"+netbeans_intg",
#else

View File

@ -15,6 +15,7 @@
defined(FEAT_PYTHON) || \
defined(FEAT_RUBY) || \
defined(FEAT_TCL) || \
defined(FEAT_MZSCHEME) || \
defined(DYNAMIC_GETTEXT) || \
defined(DYNAMIC_ICONV) || \
defined(DYNAMIC_IME) || \

View File

@ -3106,6 +3106,10 @@ win_free(wp)
{
int i;
#ifdef FEAT_MZSCHEME
mzscheme_window_free(wp);
#endif
#ifdef FEAT_PERL
perl_win_free(wp);
#endif