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, 13 May 2019 02:40:26 +0100 Message-ID: <87sgtj3zed.fsf@tcd.ie> References: <87wol0qecg.fsf@tcd.ie> <87a7hug7ld.fsf@tcd.ie> <83imwiydnr.fsf@gnu.org> <87sgvlzf6b.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="82575"; 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 13 03:41:18 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 1hPzxu-000LNk-An for ged-emacs-devel@m.gmane.org; Mon, 13 May 2019 03:41:18 +0200 Original-Received: from localhost ([127.0.0.1]:49437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPzxt-0000aZ-2y for ged-emacs-devel@m.gmane.org; Sun, 12 May 2019 21:41:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPzxG-0000aI-Qi for emacs-devel@gnu.org; Sun, 12 May 2019 21:40:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPzxF-0000vS-Qn for emacs-devel@gnu.org; Sun, 12 May 2019 21:40:38 -0400 Original-Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:41529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hPzxF-0000tl-CI for emacs-devel@gnu.org; Sun, 12 May 2019 21:40:37 -0400 Original-Received: by mail-ed1-x543.google.com with SMTP id m4so15002887edd.8 for ; Sun, 12 May 2019 18:40:35 -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=8q/U2AsDhx/ugX+UIVY6rbwv1FLnmXUG2NMqdRtBd0w=; b=01vItYLWu2XaqzKOLfrGAI7l9Zy8UKeMLN6w1DCLSArY0NPdL+Lhnvc6hTh9uOE9wM KOK9nmprXlbQVJL/xMHrA9xcR5gLvhuzW6lAbbhcQ85BenGvQcTPriBuqjn/8a0jvP4N EoSRJa+ePVPFCfY1dQ6RR1WwWPLtwCTzHUEimUNxrTww5SBmeTitQmO/pMAliKIpPPsK 0NUxtOp0d4TaPOZ5TT0bI1rxnfU2JyfitpgRyZylhuM5TIVE+igQo7BViMhu2kKV2+E+ W1fqbkMA+nzyLRM3bYKvKIkcLfabkDzOmxhaWQzX9X9Nm2jOZGnjAskO7Eeh39avBhVX hRwg== 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=8q/U2AsDhx/ugX+UIVY6rbwv1FLnmXUG2NMqdRtBd0w=; b=sn0IJ+dvw+A957tGRcv0DoexraCjlRkV6S81GSuNj4eTp9vuBg2/+UrBSdrH/A2mHg NKVvL1SDf7wN77jmqjLsUvm3rODrclMCfn7fGCXtxTMKryRDi97TBqvB48i4c+73XzKO MNYbhFSSONRU03BsqrfVupehzVxWclyywCwZAgOERQrdcC6SRilNi9orIZV+VV80qL+/ hKuX1sqGjMnPTibUu1Fa63uj5OOVv+736pwTICpGZ7ym5YRv9kZlWHaVnTkQMpTGr3Hf p1jlfqmv1x8/e5Jv4r+FOX0jULddd17F0jPfyOR+NlKbAYSRq1W5AUN7zef5hYgxyeim pAJQ== X-Gm-Message-State: APjAAAVeoEBdjnXyVfBesDZUXuvrWw1qxsH1uyp8AfqSbbAQtnUypRJc uQnbqN4oSGY5h/Q3XgYnUwT4jA== X-Google-Smtp-Source: APXvYqwzm8QodAmBI7eY6jVBW/UivgPvCtSCR8NbKjMaxcEKa9uw8V/1Ob33kavIym9L04w6aDKxjw== X-Received: by 2002:a50:aad9:: with SMTP id r25mr25854862edc.266.1557711634898; Sun, 12 May 2019 18:40:34 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id f32sm3434344edf.36.2019.05.12.18.40.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 12 May 2019 18:40:33 -0700 (PDT) In-Reply-To: <87sgvlzf6b.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 17 Mar 2019 23:33:12 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::543 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:236455 Archived-At: --=-=-= Content-Type: text/plain 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=autogen.diff 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 .*)' --=-=-= Content-Type: text/plain WDYT? Thanks, -- Basil --=-=-=--