Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.1.263
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.1.263
Problem:    The filetype can consist of two dot separated names.  This works
	    for syntax and ftplugin, but not for indent. (Brett Stahlman)
Solution:   Use split() and loop over each dot separated name.
Files:	    runtime/indent.vim


*** ../vim-7.1.262/runtime/indent.vim	Mon Mar 28 22:56:55 2005
--- runtime/indent.vim	Fri Feb 22 21:05:39 2008
***************
*** 1,7 ****
  " Vim support file to switch on loading indent files for file types
  "
  " Maintainer:	Bram Moolenaar <Bram@vim.org>
! " Last Change:	2005 Mar 28
  
  if exists("did_indent_on")
    finish
--- 1,7 ----
  " Vim support file to switch on loading indent files for file types
  "
  " Maintainer:	Bram Moolenaar <Bram@vim.org>
! " Last Change:	2008 Feb 22
  
  if exists("did_indent_on")
    finish
***************
*** 15,25 ****
        exe b:undo_indent
        unlet! b:undo_indent b:did_indent
      endif
!     if expand("<amatch>") != ""
        if exists("b:did_indent")
  	unlet b:did_indent
        endif
!       runtime! indent/<amatch>.vim
      endif
    endfunc
  augroup END
--- 15,31 ----
        exe b:undo_indent
        unlet! b:undo_indent b:did_indent
      endif
!     let s = expand("<amatch>")
!     if s != ""
        if exists("b:did_indent")
  	unlet b:did_indent
        endif
! 
!       " When there is a dot it is used to separate filetype names.  Thus for
!       " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
!       for name in split(s, '\.')
! 	exe 'runtime! indent/' . name . '.vim'
!       endfor
      endif
    endfunc
  augroup END
*** ../vim-7.1.262/src/version.c	Wed Feb 20 20:09:44 2008
--- src/version.c	Mon Feb 25 20:44:04 2008
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     263,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
45. You buy a Captain Kirk chair with a built-in keyboard and mouse.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///