git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sup Yut Sum <ch3cooli@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Sup Yut Sum <ch3cooli@gmail.com>
Subject: [PATCH 2/2] userdiff: support Java try keyword
Date: Mon,  2 Jun 2014 12:13:25 +0800	[thread overview]
Message-ID: <1401682405-3319-2-git-send-email-ch3cooli@gmail.com> (raw)
In-Reply-To: <1401682405-3319-1-git-send-email-ch3cooli@gmail.com>

try keyword is enhanced in Java 7, see try-with-resources Statement
try (XX yy = new XX()) {
} catch (Exception e){
}

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
---
 userdiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/userdiff.c b/userdiff.c
index 96eda6c..49e898b 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -39,7 +39,7 @@ IPATTERN("fortran",
 PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
 	 "[^<>= \t]+"),
 PATTERNS("java",
-	 "!^[ \t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
+	 "!^[ \t]*(try|catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
 	 "^[ \t]*(([A-Za-z_][A-Za-z_0-9]*[ \t]+)+[A-Za-z_][A-Za-z_0-9]*[ \t]*\\([^;]*)$",
 	 /* -- */
 	 "[a-zA-Z_][a-zA-Z0-9_]*"
-- 
1.9.1

  reply	other threads:[~2014-06-02  4:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02  4:13 [PATCH 1/2] userdiff: support C# async methods and correct C# keywords Sup Yut Sum
2014-06-02  4:13 ` Sup Yut Sum [this message]
2014-06-02 19:25   ` [PATCH 2/2] userdiff: support Java try keyword Junio C Hamano
2014-06-05 22:59 ` [PATCH 1/2] userdiff: support C# async methods and correct C# keywords Junio C Hamano
2014-06-06 13:27   ` Steve Hoelzer
2014-06-06 17:34     ` Junio C Hamano
2014-06-07 16:00       ` Steve Hoelzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401682405-3319-2-git-send-email-ch3cooli@gmail.com \
    --to=ch3cooli@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).