0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.0-010

This commit is contained in:
Bram Moolenaar
2006-05-13 12:25:55 +00:00
parent 5dd95a1058
commit c9a99918bd
2 changed files with 14 additions and 5 deletions

View File

@@ -1,9 +1,9 @@
" Vim script to download a missing spell file " Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 01 " Last Change: 2006 May 10
if !exists('g:spellfile_URL') if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell' let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
endif endif
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset. let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
@@ -61,13 +61,13 @@ function! spellfile#LoadFile(lang)
new new
setlocal bin setlocal bin
echo 'Downloading ' . fname . '...' echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell' if getline(2) !~ 'VIMspell'
" Didn't work, perhaps there is an ASCII one. " Didn't work, perhaps there is an ASCII one.
g/^/d g/^/d
let fname = a:lang . '.ascii.spl' let fname = a:lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...' echo 'Could not find it, trying ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell' if getline(2) !~ 'VIMspell'
echo 'Sorry, downloading failed' echo 'Sorry, downloading failed'
bwipe! bwipe!
@@ -95,7 +95,7 @@ function! spellfile#LoadFile(lang)
g/^/d g/^/d
let fname = substitute(fname, '\.spl$', '.sug', '') let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...' echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname call spellfile#Nread(fname)
if getline(2) !~ 'VIMsug' if getline(2) !~ 'VIMsug'
echo 'Sorry, downloading failed' echo 'Sorry, downloading failed'
else else
@@ -109,3 +109,10 @@ function! spellfile#LoadFile(lang)
bwipe bwipe
endif endif
endfunc endfunc
" Read "fname" from the ftp server.
function! spellfile#Nread(fname)
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
endfunc

View File

@@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
10,
/**/ /**/
9, 9,
/**/ /**/