From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6295 invoked by alias); 16 Jul 2015 23:36:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35809 Received: (qmail 28506 invoked from network); 16 Jul 2015 23:36:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=3yh zTngDwXFjdIhuJU77nPU0sFk=; b=rQ3/i78c75Fwx1ee9crI/nw2RZ/CSd4hOzx 7K5TJM5jn5a9Uor3746diWDiigYnq6GxIFkaipjWoK22+/n0LNlJ4BXtKDOqI+cB 32ATyzF943wIiTKzZ5PgmwzHrSWSWvgf8cKW1MsE+3KwtzCzxo452ioLCG7BJv61 pmgi/p6c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=3y hzTngDwXFjdIhuJU77nPU0sFk=; b=Ob9nzqN4nVevET695Auyy3/oh71y8x/6Pj y0fk+JupaP0CxTaEqeu37ljaB3sFM/35T1dIvpP/IA6DN7nrTZd5ztEvKmUmKyhN lzJRlSKvY1ksx5pN6JXjIh2G9c+MPeztLyAtPp0tOv2EMy6jJWLUpHGK4VEqU3J5 HHoUX+UsM= X-Sasl-enc: fIJy2e27hR8o1I9WamlXDjC0f9sTGngan2szMYKG2cM6 1437089775 Date: Thu, 16 Jul 2015 23:36:13 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] zyodl.vim: Fix nested parentheses Message-ID: <20150716233613.GF2032@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) --- This seems to work. Adding "contains=zyodlParenthetical" to zyodlSItemArg2 made the latter match too much, so I settled for a "skip=" instead, which ought to be good enough in practice. (The difference is whether nested parentheticals inside a zyodlSItemArg2 would be highlighted correctly, similarly to the new 'chapter(...)' testcase.) Daniel diff --git a/Util/zyodl.vim b/Util/zyodl.vim index 94efb29..b67bfa5 100644 --- a/Util/zyodl.vim +++ b/Util/zyodl.vim @@ -22,8 +22,13 @@ " example(print *.c+LPAR()#q:s/#%+LPAR()#b+RPAR()s+LPAR()*+RPAR().c/'S${match[1]}.C'/+RPAR()) " ifzman(zmanref(zshmisc))ifnzman(noderef(Redirection)) " LPAR()foo 42 foo+RPAR() +" chapter(foo (foo) foo) +" chapter(foo (foo (foo) foo) foo) bar +" +" # intentionally doubled +" sitem(foo)(foo (foo) foo) +" sitem(foo)(foo (foo) foo) " -" chapter(foo (foo) foo) # nested parentheses " sitem(foo)(foo tt(foo) foo) # nested underline if exists("b:current_syntax") @@ -33,25 +38,28 @@ endif "" Syntax groups: syn clear syn cluster zyodlInline contains=zyodlTt,zyodlVar,zyodlBold,zyodlEmph,zyodlCond -syn region zyodlTt start="\