From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Should diff.elisp.xfuncname match cl-lib macros? Date: Mon, 20 May 2019 16:03:36 +0100 Message-ID: <87zhnhgoc7.fsf@tcd.ie> References: <87wol0qecg.fsf@tcd.ie> <87a7hug7ld.fsf@tcd.ie> <83imwiydnr.fsf@gnu.org> <87sgvlzf6b.fsf@mail.linkov.net> <87sgtj3zed.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67016"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 20 17:04:30 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSjpy-000HEM-HK for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 17:04:26 +0200 Original-Received: from localhost ([127.0.0.1]:36929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSjpx-0000xx-CS for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 11:04:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSjpK-0000xr-Lk for emacs-devel@gnu.org; Mon, 20 May 2019 11:03:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSjpJ-00055n-H3 for emacs-devel@gnu.org; Mon, 20 May 2019 11:03:46 -0400 Original-Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]:42717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSjpI-000552-TO for emacs-devel@gnu.org; Mon, 20 May 2019 11:03:45 -0400 Original-Received: by mail-ed1-x542.google.com with SMTP id l25so24312768eda.9 for ; Mon, 20 May 2019 08:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fmcbS9B5CtwRWShrv3GOamLQsXDV47t3F0R/DzSodvU=; b=W6mQ0CrzWa9vlvBgLkOZUXOxh8PhnzukvLsJiIeOnSy9eotYUqdNyi+1LKIURE3OF+ g8zKHZcIzZoe0EPjtFAcV4BZ3Lh1qpgFHHTDZlj9OvoCD4v1m9QEKundJ4JdtkntLaur 6nruJPguKS8j2828cNyM/KKSYjG4LIUHOMX3MI/BZo9xNtmrw5oBCIqQQIInMtURDOcI ZUuNy49Fl5oCkiiCR4av73yATbjD4wd9qa/phZ/R4WTRQGyiQq+DYC1MatWsjGHXI7Sd u/x4MYWaq1n7n+7grBQyfEE8/VcA+e4rYh6Me8ncpChIqCeB+ppxFHo+O6FpI/eTLpAJ 399g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fmcbS9B5CtwRWShrv3GOamLQsXDV47t3F0R/DzSodvU=; b=DhDs3EO5KWpVfpaVq3ZVRGA62ecBHXjeOAEWX/xgMNgIcAwXFO/U+K5eFOeblOsVc4 yKt6XuaBNNQDIraxCzn6gvI1xtU/u7yONfWxV0VwULJvwXvRATufiGTD0cQ0wpK1OMfr L4Q8F8Xh2Te8CbghCwrtwDENDKzAY+ThNlySui8+uw/rYx69iDOaeqMwEnl2RPpnAA0/ vZclCWlI/8qSf9EkEEoV6aRrIKlp2xAQKXTTbEx+DYdpvu+1H8UaiYEAc2pJq8xtoxrc rJl++Aw8BVDoyOWIdanmuc/2xlFnMw6VV3BNqiuYTP4riraDof7k/rlEHBz1Rrf0DoTz /s1g== X-Gm-Message-State: APjAAAUukB59kT3aAcWwjbm6Ulwf09UYY+SZELZsq7D9NtNNSD2yl9zp BhL5dbXH6rlvnr3UO8nANzLhHw== X-Google-Smtp-Source: APXvYqzc9JvEPUO2VkqEezuKRQYvkJG6Tk6fmvmHlXd7Z+GjImPgdH+wntiCq+o0GF+MGa2K0MGQPg== X-Received: by 2002:a17:906:488e:: with SMTP id v14mr19715414ejq.216.1558364623161; Mon, 20 May 2019 08:03:43 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:6fa:38d6:1fce:ddb3]) by smtp.gmail.com with ESMTPSA id i2sm5550332edg.81.2019.05.20.08.03.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 20 May 2019 08:03:42 -0700 (PDT) In-Reply-To: <87sgtj3zed.fsf@tcd.ie> (Basil L. Contovounesios's message of "Mon, 13 May 2019 02:40:26 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::542 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236801 Archived-At: "Basil L. Contovounesios" writes: > Juri Linkov writes: > >> PS: Regarding the change in diff.elisp.xfuncname, can we also have >> an appropriate regexp for diff.c.xfuncname as well, to find >> DEFUN in C code? > > I'm not sure we need to define a new pattern for C files distinct from > the built-in cpp pattern, but here's a patch extending the cpp and elisp > patterns: > > diff --git a/autogen.sh b/autogen.sh > index 40d0c37b11..b5722bdb12 100755 > --- a/autogen.sh > +++ b/autogen.sh > @@ -316,8 +316,16 @@ hooks= > > # Configure 'git diff' hunk header format. > > +# This xfuncname is based on Git's built-in 'cpp' pattern. > +# The first line rejects jump targets and access declarations. > +# The second line matches top-level functions and methods. > +# The third line matches preprocessor and DEFUN macros. > +git_config diff.cpp.xfuncname \ > +'!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*]) > +^((::[[:space:]]*)?[A-Za-z_][A-Za-z_0-9]*[[:space:]]*\(.*)$ > +^((#define[[:space:]]|DEFUN).*)$' > git_config diff.elisp.xfuncname \ > - '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' > + '^\([^[:space:]]*def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' > git_config 'diff.m4.xfuncname' '^((m4_)?define|A._DEFUN(_ONCE)?)\([^),]*' > git_config 'diff.make.xfuncname' \ > '^([$.[:alnum:]_].*:|[[:alnum:]_]+[[:space:]]*([*:+]?[:?]?|!?)=|define .*)' > > WDYT? No further comments, so I pushed this to master[1]. [1: d3a0ddedba]: Improve C and Elisp Git diff hunk headers 2019-05-20 16:02:11 +0100 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d3a0ddedba53b9e2c99274c8ec125d53f991da5d Thanks, -- Basil