90c42fd
To: vim-dev@vim.org
90c42fd
Subject: Patch 7.1.263
90c42fd
Fcc: outbox
90c42fd
From: Bram Moolenaar <Bram@moolenaar.net>
90c42fd
Mime-Version: 1.0
90c42fd
Content-Type: text/plain; charset=ISO-8859-1
90c42fd
Content-Transfer-Encoding: 8bit
90c42fd
------------
90c42fd
90c42fd
Patch 7.1.263
90c42fd
Problem:    The filetype can consist of two dot separated names.  This works
90c42fd
	    for syntax and ftplugin, but not for indent. (Brett Stahlman)
90c42fd
Solution:   Use split() and loop over each dot separated name.
90c42fd
Files:	    runtime/indent.vim
90c42fd
90c42fd
90c42fd
*** ../vim-7.1.262/runtime/indent.vim	Mon Mar 28 22:56:55 2005
90c42fd
--- runtime/indent.vim	Fri Feb 22 21:05:39 2008
90c42fd
***************
90c42fd
*** 1,7 ****
90c42fd
  " Vim support file to switch on loading indent files for file types
90c42fd
  "
90c42fd
  " Maintainer:	Bram Moolenaar <Bram@vim.org>
90c42fd
! " Last Change:	2005 Mar 28
90c42fd
  
90c42fd
  if exists("did_indent_on")
90c42fd
    finish
90c42fd
--- 1,7 ----
90c42fd
  " Vim support file to switch on loading indent files for file types
90c42fd
  "
90c42fd
  " Maintainer:	Bram Moolenaar <Bram@vim.org>
90c42fd
! " Last Change:	2008 Feb 22
90c42fd
  
90c42fd
  if exists("did_indent_on")
90c42fd
    finish
90c42fd
***************
90c42fd
*** 15,25 ****
90c42fd
        exe b:undo_indent
90c42fd
        unlet! b:undo_indent b:did_indent
90c42fd
      endif
90c42fd
!     if expand("<amatch>") != ""
90c42fd
        if exists("b:did_indent")
90c42fd
  	unlet b:did_indent
90c42fd
        endif
90c42fd
!       runtime! indent/<amatch>.vim
90c42fd
      endif
90c42fd
    endfunc
90c42fd
  augroup END
90c42fd
--- 15,31 ----
90c42fd
        exe b:undo_indent
90c42fd
        unlet! b:undo_indent b:did_indent
90c42fd
      endif
90c42fd
!     let s = expand("<amatch>")
90c42fd
!     if s != ""
90c42fd
        if exists("b:did_indent")
90c42fd
  	unlet b:did_indent
90c42fd
        endif
90c42fd
! 
90c42fd
!       " When there is a dot it is used to separate filetype names.  Thus for
90c42fd
!       " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
90c42fd
!       for name in split(s, '\.')
90c42fd
! 	exe 'runtime! indent/' . name . '.vim'
90c42fd
!       endfor
90c42fd
      endif
90c42fd
    endfunc
90c42fd
  augroup END
90c42fd
*** ../vim-7.1.262/src/version.c	Wed Feb 20 20:09:44 2008
90c42fd
--- src/version.c	Mon Feb 25 20:44:04 2008
90c42fd
***************
90c42fd
*** 668,669 ****
90c42fd
--- 668,671 ----
90c42fd
  {   /* Add new patch number below this line */
90c42fd
+ /**/
90c42fd
+     263,
90c42fd
  /**/
90c42fd
90c42fd
-- 
90c42fd
hundred-and-one symptoms of being an internet addict:
90c42fd
45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
90c42fd
90c42fd
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
90c42fd
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
90c42fd
\\\        download, build and distribute -- http://www.A-A-P.org        ///
90c42fd
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///