On Monday, July 22, 2013 11:25:40 PM UTC-7, Amadeus Demarzi wrote: > On Monday, July 22, 2013 1:57:34 PM UTC-7, Amadeus Demarzi wrote: > > On Monday, July 22, 2013 1:50:39 PM UTC-7, Bram Moolenaar wrote: > > > Amadeus Demarzi wrote: > > > > > > > > > > > > > This patch fixes javascript.vim and css.vim from clobbering plugin > > > > syntaxes when sourced via html.vim. > > > > > > > > > > > > > > Would it be possible to get this in for 7.4? > > > > > > > > > > > > > > More details here: > > > > > > > https://groups.google.com/forum/#!topic/vim_dev/4Idz6Em2ZuU > > > > > > > > > > > > > > It's a long explanation, so this would be the TL;DR for it > > > > > > > > > > > > Makes sense. It can be reduced to one elseif: > > > > > > > > > > > > elseif exists("b:current_syntax") && b:current_syntax == 'css' > > > > > > finish > > > > > > endif > > > > > > > > > > > > > > > > > > -- > > > > > > "How is your new girlfriend?" > > > > > > "90-60-90 man!" > > > > > > "What, pale purple?" > > > > > > > > > > > > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net > > > \\\ > > > > > > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ > > > \\\ > > > > > > \\\ an exciting new programming language -- http://www.Zimbu.org > > > /// > > > > > > \\\ help me help AIDS victims -- http://ICCF-Holland.org > > > /// > > > > This is true, I can amend the patch and resubmit if you'd like? > > > > Thanks for the response! > > Just in case, I've attached an updated patch with the single line if > statements. Also, I noticed on my older patch a mixed the use of single and > double quotes, that should be rectified to only double quotes here as well.
Actually scratch that last one, I inadvertently removed extraneous whitespace, making it a less clean patch. Here's a better one. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
# HG changeset patch # User amadeus <[email protected]> # Date 1374560906 25200 # Mon Jul 22 23:28:26 2013 -0700 # Node ID 2f8858d9b3a13f5b9dc2d0399a973962a96ecc7d # Parent 3f65dc9c8840c376ae38e5b5d48688cb5d7a4846 Improve built in javascript.vim and css.vim in html files This commit prevents the built in javascript.vim and css.vim runtime files from clobbering a plugin that may have already setup syntax rules. diff -r 3f65dc9c8840 -r 2f8858d9b3a1 runtime/syntax/css.vim --- a/runtime/syntax/css.vim Sun Jul 21 18:59:24 2013 +0200 +++ b/runtime/syntax/css.vim Mon Jul 22 23:28:26 2013 -0700 @@ -17,6 +17,8 @@ finish endif let main_syntax = 'css' +elseif exists("b:current_syntax") && b:current_syntax == "css" + finish endif let s:cpo_save = &cpo diff -r 3f65dc9c8840 -r 2f8858d9b3a1 runtime/syntax/javascript.vim --- a/runtime/syntax/javascript.vim Sun Jul 21 18:59:24 2013 +0200 +++ b/runtime/syntax/javascript.vim Mon Jul 22 23:28:26 2013 -0700 @@ -22,6 +22,8 @@ finish endif let main_syntax = 'javascript' +elseif exists("b:current_syntax") && b:current_syntax == 'javascript' + finish endif let s:cpo_save = &cpo
