From af64ba27db237f9f49401a7e5afda1233d715f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Sat, 12 Jul 2014 12:57:01 +0200 Subject: [PATCH] E4X and XML the object are really no more. --- HACKING | 3 +- common/javascript.vim | 10 +++---- common/locale/en-US/developer.xml | 50 ++++--------------------------- 3 files changed, 11 insertions(+), 52 deletions(-) diff --git a/HACKING b/HACKING index 76536fd6..99227bdc 100644 --- a/HACKING +++ b/HACKING @@ -111,8 +111,7 @@ In general: Just look at the existing source code! Wrong: for each (let elem in ary) - The exceptions to this rule are for objects with __iterator__ set, - and for XML objects (see README.E4X). + The exceptions to this rule are for objects with __iterator__ set. * Avoid using 'new' with constructors where possible, and use [] and {} rather than new Array/new Object. diff --git a/common/javascript.vim b/common/javascript.vim index c1bfe250..77abc55b 100644 --- a/common/javascript.vim +++ b/common/javascript.vim @@ -44,10 +44,10 @@ syntax sync maxlines=200 "" JavaScript comments syntax keyword javaScriptCommentTodo TODO FIXME XXX TBD contained -syntax region javaScriptLineComment start=+\/\/+ end="\v$|(\)@=" keepend contains=javaScriptCommentTodo,@Spell -syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end="\v$|(\)@=" keepend contains=javaScriptCommentTodo,@Spell fold +syntax region javaScriptLineComment start=+\/\/+ end="\v$|(\)@=" keepend contains=javaScriptCommentTodo,@Spell +syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end="\v$|(\)@=" keepend contains=javaScriptCommentTodo,@Spell fold syntax region javaScriptCvsTag start="\$\cid:" end="\$" oneline contained -syntax region javaScriptComment start="/\*" end="\v\*/|(\)@=" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold +syntax region javaScriptComment start="/\*" end="\v\*/|(\)@=" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold "" JSDoc support start if !exists("javascript_ignore_javaScriptdoc") @@ -149,15 +149,13 @@ endif "DOM/HTML/CSS "" Code blocks -syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation,javascriptE4X,javascriptCSS,javascriptCDATA +syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation,javascriptCSS,javascriptCDATA syntax region javaScriptBracket matchgroup=javaScriptBracket transparent start="\[" end="\]" contains=@javaScriptAll,javaScriptParensErrB,javaScriptParensErrC,javaScriptBracket,javaScriptParen,javaScriptBlock,@htmlPreproc syntax region javaScriptParen matchgroup=javaScriptParen transparent start="(" end=")" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrC,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc syntax region javaScriptBlock matchgroup=javaScriptBlock transparent start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc syntax region javascriptCDATA matchgroup=javascriptCDATA start="<\!\[CDATA\[" end="\]\]>" keepend contains=javascriptCSS syntax region javascriptCSS matchgroup=javascriptCSSDelimiter start="" end="" contains=@cssTop -syntax region javascriptE4X matchgroup=javascriptE4XDelimiter start="" end="" contains=@xmlTop -syntax region javascriptE4X matchgroup=javascriptE4XDelimiter start="<>" end="" contains=@xmlTop oneline "" catch errors caused by wrong parenthesis syntax match javaScriptParensError ")\|}\|\]" diff --git a/common/locale/en-US/developer.xml b/common/locale/en-US/developer.xml index 1c1ae732..117c8748 100644 --- a/common/locale/en-US/developer.xml +++ b/common/locale/en-US/developer.xml @@ -177,55 +177,17 @@

Plugin documentation

- Plugins should provide inline documentation, which will appear on the - :help plugins page. The markup for help entries is the same - as the above, along with a few extra plugin-specific entries. Here is an - example from the popular flashblock extension: + Plugins should provide documentation, which will appear on the + :help plugins page. The XML markup for help + entries is similar to the above, but has to be written in JSON syntax. You + can find some examples in the + official plugins.

-use strict; -XML.ignoreWhitespace = false; -XML.prettyPrinting = false; -var INFO = -<plugin - nameflashblock - version1.0 - hrefhttp://5digits.org/pentadactyl/plugins#flashblock-plugin - summaryFlash Blocker - xmlns{NS}> - Kris Maglione - MIT - -

- This plugin provides the same features as the ever popular FlashBlock - Firefox addon. Flash animations are substituted with place holders which - play the original animation when clicked. Additionally, this plugin provides - options to control which sites can play animations without restrictions, and - triggers to toggle the playing of animation on the current page. -

- - 'fb' 'flashblock' - 'flashblock' 'fb' - boolean - true - -

- Controls the blocking of flash animations. When true, place - holders are substituted for flash animations on untrusted sites. -

-
-
- -</plugin>;
-

- The inline XML is made possible by - E4X. It is important that the documentation be assigned to the INFO variable, or &dactyl.appName; will not be able - to find it. The XML property changes are not compulsory, but - they do prevent certain formatting problems that may occur - otherwise. Beginning your file with use strict, while + to find it. Beginning your file with use strict, while not required, helps to prevent a lot of common errors.