From 4115987739fb9cc4dd82edd9998db6dbb6bc9d95 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 27 Jan 2014 10:23:55 -0800 Subject: [PATCH] Got permission from Gustaf for userdiff patterns --- git.git-authors | 1 + src/userdiff.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/git.git-authors b/git.git-authors index 7e53d66a9..7c72c4bf6 100644 --- a/git.git-authors +++ b/git.git-authors @@ -49,6 +49,7 @@ ok Brian Gernhardt ok Christian Couder ok Daniel Barkalow ok Florian Forster +ok Gustaf Hendeby ok Holger Weiss ok Jeff King ok Johannes Schindelin diff --git a/src/userdiff.h b/src/userdiff.h index 318761567..93b4d0d58 100644 --- a/src/userdiff.h +++ b/src/userdiff.h @@ -80,6 +80,10 @@ PATTERNS("java", "|[-+*/<>%&^|=!]=" "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"), +PATTERNS("matlab", + "^[[:space:]]*((classdef|function)[[:space:]].*)$|^%%[[:space:]].*$", + "[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\.[*/\\^']|\\|\\||&&"), + PATTERNS("objc", /* Negate C statements that can look like functions */ "!^[ \t]*(do|for|if|else|return|switch|while)\n"