[54452] contrib/mpvim/syntax/portfile.vim

mnick at macports.org mnick at macports.org
Mon Jul 27 13:59:57 PDT 2009


Revision: 54452
          http://trac.macports.org/changeset/54452
Author:   mnick at macports.org
Date:     2009-07-27 13:59:57 -0700 (Mon, 27 Jul 2009)
Log Message:
-----------
* correct portfile_highlight_space_errors handling
* fix optional -append/-delete for configure.args

Modified Paths:
--------------
    contrib/mpvim/syntax/portfile.vim

Modified: contrib/mpvim/syntax/portfile.vim
===================================================================
--- contrib/mpvim/syntax/portfile.vim	2009-07-27 20:57:46 UTC (rev 54451)
+++ contrib/mpvim/syntax/portfile.vim	2009-07-27 20:59:57 UTC (rev 54452)
@@ -1,8 +1,6 @@
 " Vim syntax file
 " Language: 	MacPorts Portfiles
 " Author: 		Maximilian Nickel <mnick at macports.org>
-" Copyright: 	Copyright (c) 2009 Maximilian Nickel
-" Licence: 		You may redistribute this under the same terms as Vim itself
 "
 
 if &compatible || v:version < 603
@@ -13,8 +11,12 @@
 	finish
 endif
 
+" Disable whitespace error highlight if variable is not set
+if !exists("g:portfile_highlight_space_errors")
+	let g:portfile_highlight_space_errors=0
+endif
+
 let is_tcl=1
-let portfile_highlight_space_errors=1
 runtime! syntax/tcl.vim
 
 unlet b:current_syntax
@@ -56,7 +58,7 @@
 " Configure phase options
 syn keyword PortfilePhasesConf 	use_configure nextgroup=PortfileYesNo skipwhite
 syn match PortfilePhasesConf 	"configure\.\(env\|\(c\|ld\|cpp\|cxx\|objc\|f\|fc\|f90\)flags\)\(-\(append\|delete\)\)\?"
-syn match PortfilePhasesConf 	"configure\.\(\(pre\|post\)\-\)\?args\(-\(\append\|delete\)\)" nextgroup=PortfileConfEntries skipwhite
+syn match PortfilePhasesConf 	"configure\.\(\(pre\|post\)\-\)\?args\(-\(\append\|delete\)\)\?" nextgroup=PortfileConfEntries skipwhite
 syn region PortfileConfEntries 	matchgroup=Normal start="" skip="\\$" end="$" contained
 syn match PortfilePhasesConf 	"configure\.\(cc\|cpp\|cxx\|objc\|fc\|f77\|f90\|javac\|compiler\)"
 syn match PortfilePhasesConf 	"configure\.\(perl\|python\|ruby\|install\|awk\|bison\)"
@@ -123,7 +125,7 @@
 syn match 	PortfileGroups 			"xcode\.universal\.\(sdk\|settings\)"
 
 " check whitespace, copied from python.vim
-if exists("portfile_highlight_space_errors")
+if g:portfile_highlight_space_errors == 1
   " trailing whitespace
   syn match   PortfileSpaceError   display excludenl "\S\s\+$"ms=s+1
   " mixed tabs and spaces
@@ -158,7 +160,7 @@
 hi def link PortfileDependsEntry 		Special
 hi def link PortfileGroups 				Keyword
 
-if exists("portfile_highlight_space_errors")
+if g:portfile_highlight_space_errors == 1
 	hi def link PortFileSpaceError	Error
 endif
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090727/fc3b1673/attachment.html>


More information about the macports-changes mailing list