Karsten Hopp f301e8
To: vim-dev@vim.org
Karsten Hopp f301e8
Subject: Patch 7.0.010
Karsten Hopp f301e8
Fcc: outbox
Karsten Hopp f301e8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f301e8
Mime-Version: 1.0
Karsten Hopp f301e8
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp f301e8
Content-Transfer-Encoding: 8bit
Karsten Hopp f301e8
------------
Karsten Hopp f301e8
Karsten Hopp f301e8
Patch 7.0.010
Karsten Hopp f301e8
Problem:    The spellfile plugin required typing login name and password.
Karsten Hopp f301e8
Solution:   Use "anonymous" and "vim7user" by default.  No need to setup a
Karsten Hopp f301e8
	    .netrc file.
Karsten Hopp f301e8
Files:	    runtime/autoload/spellfile.vim
Karsten Hopp f301e8
Karsten Hopp f301e8
Karsten Hopp f301e8
*** ../vim-7.0.009/runtime/autoload/spellfile.vim	Wed May 10 15:22:54 2006
Karsten Hopp f301e8
--- runtime/autoload/spellfile.vim	Wed May 10 17:55:15 2006
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 1,9 ****
Karsten Hopp f301e8
  " Vim script to download a missing spell file
Karsten Hopp f301e8
  " Maintainer:	Bram Moolenaar <Bram@vim.org>
Karsten Hopp f301e8
! " Last Change:	2006 Feb 01
Karsten Hopp f301e8
  
Karsten Hopp f301e8
  if !exists('g:spellfile_URL')
Karsten Hopp f301e8
!   let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
Karsten Hopp f301e8
  endif
Karsten Hopp f301e8
  let s:spellfile_URL = ''    " Start with nothing so that s:donedict is reset.
Karsten Hopp f301e8
  
Karsten Hopp f301e8
--- 1,9 ----
Karsten Hopp f301e8
  " Vim script to download a missing spell file
Karsten Hopp f301e8
  " Maintainer:	Bram Moolenaar <Bram@vim.org>
Karsten Hopp f301e8
! " Last Change:	2006 May 10
Karsten Hopp f301e8
  
Karsten Hopp f301e8
  if !exists('g:spellfile_URL')
Karsten Hopp f301e8
!   let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
Karsten Hopp f301e8
  endif
Karsten Hopp f301e8
  let s:spellfile_URL = ''    " Start with nothing so that s:donedict is reset.
Karsten Hopp f301e8
  
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 61,73 ****
Karsten Hopp f301e8
      new
Karsten Hopp f301e8
      setlocal bin
Karsten Hopp f301e8
      echo 'Downloading ' . fname . '...'
Karsten Hopp f301e8
!     exe 'Nread ' g:spellfile_URL . '/' . fname
Karsten Hopp f301e8
      if getline(2) !~ 'VIMspell'
Karsten Hopp f301e8
        " Didn't work, perhaps there is an ASCII one.
Karsten Hopp f301e8
        g/^/d
Karsten Hopp f301e8
        let fname = a:lang . '.ascii.spl'
Karsten Hopp f301e8
        echo 'Could not find it, trying ' . fname . '...'
Karsten Hopp f301e8
!       exe 'Nread ' g:spellfile_URL . '/' . fname
Karsten Hopp f301e8
        if getline(2) !~ 'VIMspell'
Karsten Hopp f301e8
  	echo 'Sorry, downloading failed'
Karsten Hopp f301e8
  	bwipe!
Karsten Hopp f301e8
--- 61,73 ----
Karsten Hopp f301e8
      new
Karsten Hopp f301e8
      setlocal bin
Karsten Hopp f301e8
      echo 'Downloading ' . fname . '...'
Karsten Hopp f301e8
!     call spellfile#Nread(fname)
Karsten Hopp f301e8
      if getline(2) !~ 'VIMspell'
Karsten Hopp f301e8
        " Didn't work, perhaps there is an ASCII one.
Karsten Hopp f301e8
        g/^/d
Karsten Hopp f301e8
        let fname = a:lang . '.ascii.spl'
Karsten Hopp f301e8
        echo 'Could not find it, trying ' . fname . '...'
Karsten Hopp f301e8
!       call spellfile#Nread(fname)
Karsten Hopp f301e8
        if getline(2) !~ 'VIMspell'
Karsten Hopp f301e8
  	echo 'Sorry, downloading failed'
Karsten Hopp f301e8
  	bwipe!
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 95,101 ****
Karsten Hopp f301e8
  	g/^/d
Karsten Hopp f301e8
  	let fname = substitute(fname, '\.spl$', '.sug', '')
Karsten Hopp f301e8
  	echo 'Downloading ' . fname . '...'
Karsten Hopp f301e8
! 	exe 'Nread ' g:spellfile_URL . '/' . fname
Karsten Hopp f301e8
  	if getline(2) !~ 'VIMsug'
Karsten Hopp f301e8
  	  echo 'Sorry, downloading failed'
Karsten Hopp f301e8
  	else
Karsten Hopp f301e8
--- 95,101 ----
Karsten Hopp f301e8
  	g/^/d
Karsten Hopp f301e8
  	let fname = substitute(fname, '\.spl$', '.sug', '')
Karsten Hopp f301e8
  	echo 'Downloading ' . fname . '...'
Karsten Hopp f301e8
! 	call spellfile#Nread(fname)
Karsten Hopp f301e8
  	if getline(2) !~ 'VIMsug'
Karsten Hopp f301e8
  	  echo 'Sorry, downloading failed'
Karsten Hopp f301e8
  	else
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 108,111 ****
Karsten Hopp f301e8
--- 108,118 ----
Karsten Hopp f301e8
  
Karsten Hopp f301e8
      bwipe
Karsten Hopp f301e8
    endif
Karsten Hopp f301e8
+ endfunc
Karsten Hopp f301e8
+ 
Karsten Hopp f301e8
+ " Read "fname" from the ftp server.
Karsten Hopp f301e8
+ function! spellfile#Nread(fname)
Karsten Hopp f301e8
+   let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
Karsten Hopp f301e8
+   let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
Karsten Hopp f301e8
+   exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
Karsten Hopp f301e8
  endfunc
Karsten Hopp f301e8
*** ../vim-7.0.009/src/version.c	Wed May 10 17:51:22 2006
Karsten Hopp f301e8
--- src/version.c	Wed May 10 17:53:53 2006
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 668,669 ****
Karsten Hopp f301e8
--- 668,671 ----
Karsten Hopp f301e8
  {   /* Add new patch number below this line */
Karsten Hopp f301e8
+ /**/
Karsten Hopp f301e8
+     10,
Karsten Hopp f301e8
  /**/
Karsten Hopp f301e8
Karsten Hopp f301e8
-- 
Karsten Hopp f301e8
I AM THANKFUL...
Karsten Hopp f301e8
...for the mess to clean after a party because it means I have
Karsten Hopp f301e8
been surrounded by friends.
Karsten Hopp f301e8
Karsten Hopp f301e8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f301e8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f301e8
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp f301e8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///