GNU bug report logs - #76373
31.0.50; Extend autoconf-mode macro support

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: "Basil L. Contovounesios" <basil@HIDDEN>; Done: "Basil L. Contovounesios" <basil@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 76373-done <at> debbugs.gnu.org:


Received: (at 76373-done) by debbugs.gnu.org; 19 Feb 2025 19:49:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 14:49:45 2025
Received: from localhost ([127.0.0.1]:52233 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkq4n-0005yJ-77
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2025 14:49:45 -0500
Received: from mta-05-3.privateemail.com ([198.54.118.212]:62805)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <basil@HIDDEN>)
 id 1tkq4k-0005xM-N1; Wed, 19 Feb 2025 14:49:43 -0500
Received: from mta-05.privateemail.com (localhost [127.0.0.1])
 by mta-05.privateemail.com (Postfix) with ESMTP id 4Yyn6730xtz3hhV1;
 Wed, 19 Feb 2025 14:49:35 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=contovou.net;
 s=default; t=1739994575;
 bh=FmLqJZl2TnxwWf0SEv/addto0BbnNilcAoMgyCdMn70=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=rV6XlZyvyanNM3Tccnv+pOKjfIGYvhaH8PKTV3rdKHGO0B53KYMrxBW5keAkXA/qN
 waWjZi46Lsusq+FNddhkMIOXe35Dxeh6YgpjtfMC/z8J2qb7TBImeKE3YrRdAUYxx2
 yBJE+gMQbW7gwoRDHorf826nnZ++GgBVr49ntukeCUC5lTzhm+zkS+PsrnuptZB2Fv
 Bpn8prP5xjv6izQ6/3GQ6etkHyUu/mLECpeJET1jqaW2xfmRH2epyu38/7u+mJCaa2
 JBVsHhn4NaUkQlqaj0oMJ0gPPQzWEuOYNCdnfHWuiZhaY+f8TJXzcoMVQdvUPARSwI
 ai6HMg63/0UNQ==
Received: from localhost (unknown [31.46.242.24])
 by mta-05.privateemail.com (Postfix) with ESMTPA;
 Wed, 19 Feb 2025 14:49:31 -0500 (EST)
From: "Basil L. Contovounesios" <basil@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support
In-Reply-To: <14d7d263-81fa-4bed-b138-4a5f76ea3d1c@HIDDEN>
References: <87msekcmdv.fsf@HIDDEN>
 <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
 <8734gb3vxj.fsf@HIDDEN>
 <14d7d263-81fa-4bed-b138-4a5f76ea3d1c@HIDDEN>
Date: Wed, 19 Feb 2025 20:49:26 +0100
Message-ID: <874j0p7m0p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 76373-done
Cc: 76373-done <at> debbugs.gnu.org, Dave Love <fx@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

close 76373 31.1
quit

Paul Eggert [2025-02-18 16:29 -0800] wrote:
> On 2/18/25 11:16, Basil L. Contovounesios wrote:
>> I'm on the fence about whether it's actually better like this.
> Let's leave it alone, then.

Okay, closing then.
Thanks,
-- 
Basil




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.
bug marked as fixed in version 31.1, send any further explanations to 76373 <at> debbugs.gnu.org and "Basil L. Contovounesios" <basil@HIDDEN> Request was from "Basil L. Contovounesios" <basil@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 76373 <at> debbugs.gnu.org:


Received: (at 76373) by debbugs.gnu.org; 19 Feb 2025 00:29:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 19:29:55 2025
Received: from localhost ([127.0.0.1]:36478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkXyM-0003RB-JP
	for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 19:29:54 -0500
Received: from mail.cs.ucla.edu ([131.179.128.66]:48426)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eggert@HIDDEN>)
 id 1tkXyJ-0003QU-Sm
 for 76373 <at> debbugs.gnu.org; Tue, 18 Feb 2025 19:29:52 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id CF1153C005174;
 Tue, 18 Feb 2025 16:29:45 -0800 (PST)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id bsbD6Y56RWWt; Tue, 18 Feb 2025 16:29:45 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 8DA833C01EBA2;
 Tue, 18 Feb 2025 16:29:45 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 8DA833C01EBA2
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739924985;
 bh=qWTIN84AUjsH1XtRHQJiE94EjOZjgnxPrA4MLhgKMNI=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=YqjCUGAj/HvnYBIVHfcW25kTEf53wwr2Yz7dsPjnYShlRNep7nlXFwKW1dB90hm0l
 JiWzcqqb2NucRvq8Pn8mYKMlPJpyA91JvlTpnhjJfiXMPT7uU0eEnJ46leZH0iTfUE
 nMIMDvWKL/KCw9okBHsuOs7MJff3ftvRtso+PJx4t0tUsHU3zEsY7k2f5DsrnXRk3O
 nBuMVyJLnBk8YSc1dP0EyVZGtPMtH88FQo7Z4+lFUErNAm8edTFYWQkV5/2w9vhONs
 TMMyctzv/H0Xazn92rZ941PSlkEyXLQIIlLMQTiciQHIrupc9561zoiMhcy+EJB/dn
 vCZILLsoO60cg==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id 6EkxNSt87-hy; Tue, 18 Feb 2025 16:29:45 -0800 (PST)
Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id 4E79C3C005174;
 Tue, 18 Feb 2025 16:29:45 -0800 (PST)
Message-ID: <14d7d263-81fa-4bed-b138-4a5f76ea3d1c@HIDDEN>
Date: Tue, 18 Feb 2025 16:29:44 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support
To: "Basil L. Contovounesios" <basil@HIDDEN>
References: <87msekcmdv.fsf@HIDDEN>
 <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
 <8734gb3vxj.fsf@HIDDEN>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; keydata=
 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
Organization: UCLA Computer Science Department
In-Reply-To: <8734gb3vxj.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 76373
Cc: Dave Love <fx@HIDDEN>, 76373 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2/18/25 11:16, Basil L. Contovounesios wrote:
> I'm on the fence about whether it's actually better like this.

Let's leave it alone, then.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.

Message received at 76373 <at> debbugs.gnu.org:


Received: (at 76373) by debbugs.gnu.org; 18 Feb 2025 19:16:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 14:16:57 2025
Received: from localhost ([127.0.0.1]:33357 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkT5U-0002Y9-Sq
	for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 14:16:57 -0500
Received: from mta-12-4.privateemail.com ([198.54.127.107]:48139)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <basil@HIDDEN>)
 id 1tkT5S-0002XE-0W
 for 76373 <at> debbugs.gnu.org; Tue, 18 Feb 2025 14:16:54 -0500
Received: from mta-12.privateemail.com (localhost [127.0.0.1])
 by mta-12.privateemail.com (Postfix) with ESMTP id 4Yy8Qm05qyz3hhV5;
 Tue, 18 Feb 2025 14:16:48 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=contovou.net;
 s=default; t=1739906208;
 bh=odZGf/8ftQXw6VB0SIkvUu9RaZ3cHl3P2xxKRmnqsg0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=UoMfMRDwKhhbaqYRpOWgwVAf6WUXghwIOvwCTFXwy2isV6TC+fxW/6Ev37yne+8tA
 IQjkDQqiVGBh7QvacuK9puTI5SMiq65MTcdPvpevc6ju5t6xH4/vCEmjkdY/pcuLW8
 NUSW1RB1LEunEDlsE5gvJYObe8LvKPqaYyFEOdJf31LLO1jfCbDt0Zf8T8RPXqYA7w
 GqQcdMAgCfDX3p+E8Ab3f+Ft2ucQUrMz8Fw/UxHXYBvUQjsWn6uH9MRPA7p+RJNjVe
 oxx/EAd46ZVUlUVco8QB0g4l0cjcXZsp9cqjLbPe4y09wA2TPFCB8I6TGI+4cXwI3j
 4zh6hc5UfNpzw==
Received: from localhost (unknown [31.46.242.24])
 by mta-12.privateemail.com (Postfix) with ESMTPA;
 Tue, 18 Feb 2025 14:16:45 -0500 (EST)
From: "Basil L. Contovounesios" <basil@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support
In-Reply-To: <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
References: <87msekcmdv.fsf@HIDDEN>
 <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
Date: Tue, 18 Feb 2025 20:16:40 +0100
Message-ID: <8734gb3vxj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 76373
Cc: Dave Love <fx@HIDDEN>, 76373 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Paul Eggert [2025-02-17 17:32 -0800] wrote:
> On 2025-02-17 13:05, Basil L. Contovounesios wrote:
>> The attached patch extends autoconf-mode
> Thanks, I installed it.

Thanks.

>> Also, a question: should defun-prompt-regexp really allow for leading
>> indentation?  In Autoconf scripts of the form:
>> if ...
>>    ...
>>    AC_MSG_...
>>    ...
>>    AC_MSG_...
>>    ...
>> fi
>> it means that beginning-of-defun stops at every indented AC_ or AM_
>> macro call (and with the attached patch, at any macro call with a known
>> namespace).
>
> Conversely, there may be conditional definitions of functions, e.g., Gnulib does
> this:
>
>   AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS],
>   [
>     dnl Override gl_MODULE_INDICATOR_FOR_TESTS.
>     AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [])
>   ])

Right, but there seems to be some tension here between 'defun' as a
toplevel definition/form vs any (nested) definition.

> Could we change the search for defuns to be more selective? It's not reasonable
> to think that every AC_.... call is a defun.

Like so?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=defun.diff

diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el
index c5b076bfacc..c313aa8d671 100644
--- a/lisp/progmodes/autoconf.el
+++ b/lisp/progmodes/autoconf.el
@@ -54,6 +54,28 @@ autoconf--macro
         "gl") ;; Gnulib.
      ?_ autoconf--symbol))
 
+;; Autoconf macros that define a variable symbol.
+(rx-define autoconf--defvar
+  (| "AC_SUBST"
+     "AH_TEMPLATE"
+     "AH_VERBATIM"
+     "AM_CONDITIONAL"
+     "AM_MISSING_PROG"))
+
+;; Autoconf macros that define a function symbol.
+(rx-define autoconf--defun
+  (| "AC_DEFUN"
+     "AC_DEFUN_ONCE"
+     "AU_ALIAS"
+     "AU_DEFUN"))
+
+;; Autoconf macros that define something.
+(rx-define autoconf--define
+  (| "AC_DEFINE"
+     "AC_DEFINE_UNQUOTED"
+     autoconf--defvar
+     autoconf--defun))
+
 (defconst autoconf-definition-regexp
   ;; Historically this `defconst' defined only group #1.
   ;; For internal Font Lock use, the presence of an optional group #2
@@ -70,15 +92,8 @@ autoconf-definition-regexp
               ;; knowledge of shell syntax, so don't bother for now.
               (| (: plaindef (? (group-n 2 ?\()))
                  (: "_UNQUOTED" argbeg (group-n 1 (+ (not argend))))))
-           (: (| "AC_SUBST"
-                 "AH_TEMPLATE"
-                 "AH_VERBATIM"
-                 "AM_CONDITIONAL"
-                 "AM_MISSING_PROG"
-                 (group-n 2 (| "AC_DEFUN"
-                               "AC_DEFUN_ONCE"
-                               "AU_ALIAS"
-                               "AU_DEFUN")))
+           (: (| autoconf--defvar
+                 (group-n 2 autoconf--defun))
               plaindef))))
   "Matches Autoconf macro calls that define something.
 The thing being defined is captured in the first subexpression group.")
@@ -122,7 +137,7 @@ autoconf-mode
   "Major mode for editing Autoconf configure.ac files."
   (setq-local parens-require-spaces nil) ; for M4 arg lists
   ;; FIXME: Should indented macro calls really count as defuns?
-  (setq-local defun-prompt-regexp (rx bol (* (in "\t ")) autoconf--macro))
+  (setq-local defun-prompt-regexp (rx bol (* (in "\t ")) autoconf--define))
   (setq-local open-paren-in-column-0-is-defun-start nil)
   (setq-local comment-start "dnl ")
   ;; We want to avoid matching "dnl" in other text.

--=-=-=
Content-Type: text/plain


I'm on the fence about whether it's actually better like this.  I now
find it unpredictable just how far C-M-a will travel in search of a
definition, and Imenu already presents an alternative means of jumping
only to definitions.

But I don't feel too strongly and can see the utility either way, so I
defer to others who write more Autoconf than I do.

-- 
Basil

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.

Message received at 76373 <at> debbugs.gnu.org:


Received: (at 76373) by debbugs.gnu.org; 18 Feb 2025 19:05:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 14:05:35 2025
Received: from localhost ([127.0.0.1]:33241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkSuU-0001N7-US
	for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 14:05:35 -0500
Received: from mta-05-3.privateemail.com ([198.54.118.212]:43583)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <basil@HIDDEN>)
 id 1tkSuR-0001ME-Kf
 for 76373 <at> debbugs.gnu.org; Tue, 18 Feb 2025 14:05:32 -0500
Received: from mta-05.privateemail.com (localhost [127.0.0.1])
 by mta-05.privateemail.com (Postfix) with ESMTP id 4Yy89c5gBvz3hhVY;
 Tue, 18 Feb 2025 14:05:24 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=contovou.net;
 s=default; t=1739905524;
 bh=pKW+lOCBT1w2N7IuL1ixXIDaEDc25Ol2Vk/wJScc27A=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=LagH0gFju1BdtzjucTs3L1nqr+hpG/9PaPEf2BwoYHUo/eKr0hrtquq7aXVVLlMfm
 teAsbfi0Bc6zFwj7d4YhNLh2MQJ6ZWbRo2lQdbkfvFOYLqtCus8TCvB7h4cn0lXG9h
 3/LfmUFi0cY9GV2uVYAgiN0pmYE+gHUzdT9QgrsIooF1sypW/dBjWh9ws/oI8sbrh7
 2q7r6GR09ksqTnVuqGH3reiFJ5fgIRHTLbT6V1uXvxF5sM7MceT12lsK/2q41+jWEV
 FX4uu8vJgK1sE/tFH/1bjWrXXcPUsCTLvSjN4MQlLCyg4LVp85pux+xsrpJ+ijEdpS
 EKUu62ZQRBK9w==
Received: from localhost (unknown [31.46.242.24])
 by mta-05.privateemail.com (Postfix) with ESMTPA;
 Tue, 18 Feb 2025 14:05:20 -0500 (EST)
From: "Basil L. Contovounesios" <basil@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support
In-Reply-To: <86eczv9zt0.fsf@HIDDEN>
References: <87msekcmdv.fsf@HIDDEN>
 <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
 <86eczv9zt0.fsf@HIDDEN>
Date: Tue, 18 Feb 2025 20:05:16 +0100
Message-ID: <87cyffrs43.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 76373
Cc: Paul Eggert <eggert@HIDDEN>, fx@HIDDEN, 76373 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii [2025-02-18 14:56 +0200] wrote:

> Please never rely blindly on people who submit "git format-patch"
> patches to have the bug number in the log message.  They don't always
> have that, especially if the patch is the first message that creates
> the debbugs bug, because the number is unknown when the patch is
> submitted.

Right, I also could have waited for the bug# before submitting the
patch.  Didn't expect it to be applied near the speed of light :).

-- 
Basil




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.

Message received at 76373 <at> debbugs.gnu.org:


Received: (at 76373) by debbugs.gnu.org; 18 Feb 2025 12:56:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 07:56:43 2025
Received: from localhost ([127.0.0.1]:56225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkN9W-0007es-MR
	for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 07:56:42 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:40580)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tkN9T-0007eM-8o
 for 76373 <at> debbugs.gnu.org; Tue, 18 Feb 2025 07:56:40 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tkN9M-0002uj-5w; Tue, 18 Feb 2025 07:56:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=cLDRMj7adRMDP7Lv0Hx6M83jgiUdwxR8M8E7uoF1rOc=; b=pY+vTQzeZQzO
 /Qb8Yo/KIUqz+Dh9XRjNP9cnfvr3WmqofsLfnMtEX00efOQvIQ+LmjknBk2igsL9QuE6iDGCmDTnG
 7HX3fTVi0PY2EJRqHq84OMiP3Jblb4gebIpBrsfXYHYzAT3ejc4qYUQ1C41o64tWyVhpp+Ujsl8ua
 bB66TwxAe2uHe3KPvbSuZTrxM0KXkAydUuECKXnEnXAfsmpcLKpWyja4/P6rLgLVF+Z8UWo7vnVHV
 xlD0UrsWnkAoVvQvpLILRkfwnNv8opUkPkxk1P1NBv5jbYk3EiUBF/F7hxEmgA7HG8yL2xLR1zAj9
 HhMQY0MhBdU4/H3Z5/3Ntw==;
Date: Tue, 18 Feb 2025 14:56:27 +0200
Message-Id: <86eczv9zt0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN> (message from
 Paul Eggert on Mon, 17 Feb 2025 17:32:57 -0800)
Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support
References: <87msekcmdv.fsf@HIDDEN>
 <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76373
Cc: fx@HIDDEN, basil@HIDDEN, 76373 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Dave Love <fx@HIDDEN>, 76373 <at> debbugs.gnu.org
> Date: Mon, 17 Feb 2025 17:32:57 -0800
> From: Paul Eggert <eggert@HIDDEN>
> 
> On 2025-02-17 13:05, Basil L. Contovounesios wrote:
> > The attached patch extends autoconf-mode
> 
> Thanks, I installed it.

Without the bug-number reference, sigh...

Please never rely blindly on people who submit "git format-patch"
patches to have the bug number in the log message.  They don't always
have that, especially if the patch is the first message that creates
the debbugs bug, because the number is unknown when the patch is
submitted.

Please always eyeball the change before pushing, and if needed, use
"git commit --amend" to edit the commit log message to add the bug
number and fix any other blunders you find there.

TIA




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.

Message received at 76373 <at> debbugs.gnu.org:


Received: (at 76373) by debbugs.gnu.org; 18 Feb 2025 01:33:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 17 20:33:07 2025
Received: from localhost ([127.0.0.1]:51789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkCTy-00084M-OO
	for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 20:33:07 -0500
Received: from mail.cs.ucla.edu ([131.179.128.66]:33610)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eggert@HIDDEN>)
 id 1tkCTw-00083P-1d
 for 76373 <at> debbugs.gnu.org; Mon, 17 Feb 2025 20:33:04 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 27C123C00FA94;
 Mon, 17 Feb 2025 17:32:58 -0800 (PST)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id zPaWlkDr3DFP; Mon, 17 Feb 2025 17:32:57 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id DADAC3C00FAAF;
 Mon, 17 Feb 2025 17:32:57 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu DADAC3C00FAAF
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739842377;
 bh=iiHH1UDE/Dn8AuF275Yg50OZoEvhPj4PZu7oOwYcOEw=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=VrQA5E56HNe1EXyqIkHHa74xDKRxgMw2bgQlCSFp0ng3k66q2YLHicFDnRCpum08a
 qmlB1MZss3kf2zng4dOEp6lu4nVxG90StnJSstU9hagQcG4791iDWTugMAFu5vTi6s
 tODrbTsGIMP5nFEIa6RKu7dTt4u7GX/HQgJTUjCwDVq+gmv6zV65p/nxWjO6nctXlJ
 P5IcA8Yli382BPHGm1syoa6R9ToNpi375+TEw+JNjgwX2WWRghCYq5q7kw8lG6m9sw
 OuxkVdYacSWxN+WZrw7Z1aKkcDeARwJ+Q/zKnhaKtOSuNYLpn+NM47jguq/1EZ2/+R
 n0BkbqdMR2tMQ==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id UUYoUaOIu5Fh; Mon, 17 Feb 2025 17:32:57 -0800 (PST)
Received: from [192.168.254.12] (unknown [47.147.225.25])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id B878A3C00FA94;
 Mon, 17 Feb 2025 17:32:57 -0800 (PST)
Message-ID: <11b5bb69-8760-48f7-a300-877c85c85af7@HIDDEN>
Date: Mon, 17 Feb 2025 17:32:57 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support
To: "Basil L. Contovounesios" <basil@HIDDEN>
References: <87msekcmdv.fsf@HIDDEN>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <87msekcmdv.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 76373
Cc: Dave Love <fx@HIDDEN>, 76373 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2025-02-17 13:05, Basil L. Contovounesios wrote:
> The attached patch extends autoconf-mode

Thanks, I installed it.


> Also, a question: should defun-prompt-regexp really allow for leading
> indentation?  In Autoconf scripts of the form:
> 
> if ...
> 
>    ...
>    AC_MSG_...
>    ...
>    AC_MSG_...
>    ...
> 
> fi
> 
> it means that beginning-of-defun stops at every indented AC_ or AM_
> macro call (and with the attached patch, at any macro call with a known
> namespace).

Conversely, there may be conditional definitions of functions, e.g., 
Gnulib does this:

   AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS],
   [
     dnl Override gl_MODULE_INDICATOR_FOR_TESTS.
     AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [])
   ])

Admittedly this sort of thing is rare.

Could we change the search for defuns to be more selective? It's not 
reasonable to think that every AC_.... call is a defun.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Feb 2025 21:06:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 17 16:06:10 2025
Received: from localhost ([127.0.0.1]:50057 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tk8Jd-0000e4-61
	for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 16:06:10 -0500
Received: from lists.gnu.org ([2001:470:142::17]:38082)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <basil@HIDDEN>)
 id 1tk8JY-0000cy-6D
 for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 16:06:07 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <basil@HIDDEN>)
 id 1tk8JS-0008MS-EB
 for bug-gnu-emacs@HIDDEN; Mon, 17 Feb 2025 16:05:58 -0500
Received: from mta-07-3.privateemail.com ([198.54.118.214])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <basil@HIDDEN>)
 id 1tk8JO-0004L9-S9
 for bug-gnu-emacs@HIDDEN; Mon, 17 Feb 2025 16:05:58 -0500
Received: from mta-07.privateemail.com (localhost [127.0.0.1])
 by mta-07.privateemail.com (Postfix) with ESMTP id 4YxZv4729rz3hhVr
 for <bug-gnu-emacs@HIDDEN>; Mon, 17 Feb 2025 16:05:52 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=contovou.net;
 s=default; t=1739826353;
 bh=qXDgyYntSFbW2CYqaO4APy36YX3+MZCP+SMpki4gu7w=;
 h=From:To:Subject:Date:From;
 b=WiTp+3ERSapEVSxWDntg/UJ6e5bRFyr7p6A8ZN69Wy2OeU3DX6Vkt6V05DIN80v/d
 zw5+/jStg30s6RIdKW7QLATn8BgJs8UwbDMJpP/wM1Cg3NF/Fe3ksVKfvslkd52MtH
 Z2XliQt5ZPnjwkw3q0jCxndo4wnAI71r6DZ6npqPyLwltcy82jlG8xA5PEhYFoc48Q
 aZa1p0hz5Yx2kL2A5NLtqzFOIxspQ6EVDrDgQdgtxs0pIZXfsN/rfGWmXkATjH6PmL
 okOUIYHYZd4mKJViWoNvXaUyqSLAizOdsVsmCygcbZR6+Axj7XPEyCHEvcTRm36eb1
 tr3Q7sTad87NQ==
Received: from localhost (unknown [146.70.196.201])
 by mta-07.privateemail.com (Postfix) with ESMTPA
 for <bug-gnu-emacs@HIDDEN>; Mon, 17 Feb 2025 16:05:51 -0500 (EST)
From: "Basil L. Contovounesios" <basil@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; Extend autoconf-mode macro support
X-Debbugs-Cc: Paul Eggert <eggert@HIDDEN>, Dave Love <fx@HIDDEN>
Date: Mon, 17 Feb 2025 22:05:48 +0100
Message-ID: <87msekcmdv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Virus-Scanned: ClamAV using ClamSMTP
Received-SPF: pass client-ip=198.54.118.214; envelope-from=basil@HIDDEN;
 helo=MTA-07-3.privateemail.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain

The attached patch extends autoconf-mode to:

- also fontify AU_, AX_, and gl_ macro calls as keywords;

- also recognise AH_, AS_, AU_, AX_, LT_, and gl_ macro calls as targets
  for beginning-of-defun, but not an opening square bracket in column 0;

- fontify the first argument of AC_DEFINE, AC_DEFINE_UNQUOTED, AC_SUBST,
  and AH_TEMPLATE with font-lock-variable-name-face instead of
  font-lock-function-name-face;

- also fontify the first argument of AH_VERBATIM, AM_CONDITIONAL, and
  AM_MISSING_PROG as a variable;

- fontify the first argument of AC_DEFUN, AC_DEFUN_ONCE, AU_ALIAS,
  AU_DEFUN, and function-like AC_DEFINE as a function;

- support backslashes, variable substitutions, and command substitutions
  with backticks in the first argument of AC_DEFINE_UNQUOTED; and

- fontify changequote only when it stands freely, not when it is part of
  m4_changequote (where either the whole macro name should be fontified,
  or no part of it).

WDYT?

Also, a question: should defun-prompt-regexp really allow for leading
indentation?  In Autoconf scripts of the form:

if ...

  ...
  AC_MSG_...
  ...
  AC_MSG_...
  ...

fi

it means that beginning-of-defun stops at every indented AC_ or AM_
macro call (and with the attached patch, at any macro call with a known
namespace).

Is this a feature (which allows jumping to the Autoconf parts in a sea
of shell code), or does it break from expected beginning-of-defun
semantics?

Thanks,
-- 
Basil


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Improve-autoconf-mode-macro-detection.patch

From 584df731dc453f63bdc95ef08c8476bf6d973d60 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <basil@HIDDEN>
Date: Wed, 29 Jan 2025 14:05:39 +0100
Subject: [PATCH] Improve autoconf-mode macro detection

* doc/lispref/modes.texi (Search-based Fontification): Fix
indentation of (MATCHER . FACESPEC) example.
* doc/misc/cc-mode.texi (Performance Issues): Index
defun-prompt-regexp under variables, not functions.

* lisp/progmodes/autoconf.el (autoconf--symbol, autoconf--macro):
New rx definitions.
(autoconf-definition-regexp): Use an optional second capture group
to indicate a function rather than variable definition.  Detect
AC_DEFINE defining a function-like CPP macro.  Skip more shell
syntax such as variable ${} expansion and command `` substitution in
AC_DEFINE_UNQUOTED variable.  Match AH_VERBATIM, AM_CONDITIONAL, and
AM_MISSING_PROG as defining variables, and AC_DEFUN, AC_DEFUN_ONCE,
AU_ALIAS, and AU_DEFUN as defining functions.  Document first
capture group in docstring.
(autoconf-font-lock-keywords): Use autoconf--macro to match more
Autoconf macros, such as those defined in the Autoconf Archive and
Gnulib.  Reserve font-lock-function-name-face for function
definitions as determined by autoconf-definition-regexp, and use
font-lock-variable-name-face for the rest instead.  Use Font Lock
face symbols directly in place of their corresponding variable.
Fontify M4 changequote primitive only as a standalone symbol.
(autoconf-imenu-generic-expression): Add commentary mentioning new
submenu possibility.
(autoconf-current-defun-function): Update docstring accuracy.
Replace line-end-position with pos-eol since there are no fields.
(autoconf-mode): Define defun-prompt-regexp in terms of
autoconf--macro to support more toplevel macros, such as those
defined in Autoheader, M4sh, etc.  Set
open-paren-in-column-0-is-defun-start to nil to avoid false
positives when an Autoconf quote character is in column zero.

* test/lisp/progmodes/autoconf-resources/configure.ac: New file.
* test/lisp/progmodes/autoconf-tests.el
(autoconf-tests-current-defun-function-define)
(autoconf-tests-current-defun-function-subst): Replace character
motion with search.
(autoconf-tests-autoconf-mode-comment-syntax): Ditto.  Test both dnl
and # comments.  Use syntax-ppss-context.
(autoconf-tests-font-lock): New test.
---
 doc/lispref/modes.texi                        |   2 +-
 doc/misc/cc-mode.texi                         |   2 +-
 lisp/progmodes/autoconf.el                    |  65 ++++++-
 .../progmodes/autoconf-resources/configure.ac | 172 ++++++++++++++++++
 test/lisp/progmodes/autoconf-tests.el         |  32 ++--
 5 files changed, 249 insertions(+), 24 deletions(-)
 create mode 100644 test/lisp/progmodes/autoconf-resources/configure.ac

diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 6e2a9d8221e..04a2e2ce059 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3420,7 +3420,7 @@ Search-based Fontification
 
 @example
 (@var{subexp}
-(face @var{face} @var{prop1} @var{val1} @var{prop2} @var{val2}@dots{}))
+ (face @var{face} @var{prop1} @var{val1} @var{prop2} @var{val2}@dots{}))
 @end example
 
 @noindent
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index b8a68f054f2..d443fddd3f8 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -7531,7 +7531,7 @@ Performance Issues
 searching for such a brace when it's not in column 0 is minimal,
 except perhaps when you've just moved a long way inside the file.
 
-@findex defun-prompt-regexp
+@vindex defun-prompt-regexp
 @vindex c-Java-defun-prompt-regexp
 @vindex Java-defun-prompt-regexp @r{(c-)}
 A special note about @code{defun-prompt-regexp} in Java mode: The common
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el
index 8cee38cf033..c5b076bfacc 100644
--- a/lisp/progmodes/autoconf.el
+++ b/lisp/progmodes/autoconf.el
@@ -40,16 +40,58 @@ autoconf-mode-map
 (defvar autoconf-mode-hook nil
   "Hook run by `autoconf-mode'.")
 
+(rx-define autoconf--symbol (+ (| (syntax word) (syntax symbol))))
+
+;; Any Autoconf macro name.
+(rx-define autoconf--macro
+  (: (| "AC"  ;; Autoconf.
+        "AH"  ;; Autoheader.
+        "AM"  ;; Automake.
+        "AS"  ;; M4sh.
+        "AU"  ;; Autoupdate.
+        "AX"  ;; Autoconf Archive.
+        "LT"  ;; Libtool.
+        "gl") ;; Gnulib.
+     ?_ autoconf--symbol))
+
 (defconst autoconf-definition-regexp
-  "A\\(?:H_TEMPLATE\\|C_\\(?:SUBST\\|DEFINE\\(?:_UNQUOTED\\)?\\)\\)(\\[*\\(\\(?:\\sw\\|\\s_\\)+\\)\\]*")
+  ;; Historically this `defconst' defined only group #1.
+  ;; For internal Font Lock use, the presence of an optional group #2
+  ;; identifies a function rather than variable definition.
+  (rx-let ((argbeg (: ?\( (* ?\[)))
+           (argend (in "]),"))
+           (plaindef (: argbeg (group-n 1 autoconf--symbol))))
+    (rx symbol-start
+        (| (: "AC_DEFINE"
+              ;; AC_DEFINE and AC_DEFINE_UNQUOTED can define object- and
+              ;; function-like CPP macros.  An open-paren is easy to
+              ;; detect in the case of AC_DEFINE.  Doing the same for
+              ;; AC_DEFINE_UNQUOTED in the general case requires
+              ;; knowledge of shell syntax, so don't bother for now.
+              (| (: plaindef (? (group-n 2 ?\()))
+                 (: "_UNQUOTED" argbeg (group-n 1 (+ (not argend))))))
+           (: (| "AC_SUBST"
+                 "AH_TEMPLATE"
+                 "AH_VERBATIM"
+                 "AM_CONDITIONAL"
+                 "AM_MISSING_PROG"
+                 (group-n 2 (| "AC_DEFUN"
+                               "AC_DEFUN_ONCE"
+                               "AU_ALIAS"
+                               "AU_DEFUN")))
+              plaindef))))
+  "Matches Autoconf macro calls that define something.
+The thing being defined is captured in the first subexpression group.")
 
 (defvar autoconf-font-lock-keywords
-  `(("\\_<\\(?:A[CHMS]\\|LT\\)_\\(?:\\sw\\|\\s_\\)+" . font-lock-keyword-face)
+  `(,(rx symbol-start autoconf--macro)
     (,autoconf-definition-regexp
-     1 font-lock-function-name-face)
+     1 (if (match-beginning 2)
+           'font-lock-function-name-face
+         'font-lock-variable-name-face))
     ;; Are any other M4 keywords really appropriate for configure.ac,
     ;; given that we do `dnl'?
-    ("changequote" . font-lock-keyword-face)))
+    "\\_<changequote\\_>"))
 
 (defvar autoconf-mode-syntax-table
   (let ((table (make-syntax-table)))
@@ -59,15 +101,17 @@ autoconf-mode-syntax-table
     table))
 
 (defvar autoconf-imenu-generic-expression
+  ;; This lists both variable-like and function-like definitions in a
+  ;; flat list, but they could be distinguished if desired.
   (list (list nil autoconf-definition-regexp 1)))
 
 ;; It's not clear how best to implement this.
 (defun autoconf-current-defun-function ()
   "Function to use for `add-log-current-defun-function' in Autoconf mode.
-This version looks back for an AC_DEFINE or AC_SUBST.  It will stop
-searching backwards at another AC_... command."
+This version looks back for a definition such as by AC_DEFINE or
+AC_SUBST.  It stops searching when it encounters other Autoconf macros."
   (save-excursion
-    (skip-syntax-forward "w_" (line-end-position))
+    (skip-syntax-forward "w_" (pos-eol))
     (if (re-search-backward autoconf-definition-regexp
                             (save-excursion (beginning-of-defun) (point))
                             t)
@@ -77,14 +121,15 @@ autoconf-current-defun-function
 (define-derived-mode autoconf-mode prog-mode "Autoconf"
   "Major mode for editing Autoconf configure.ac files."
   (setq-local parens-require-spaces nil) ; for M4 arg lists
-  (setq-local defun-prompt-regexp "^[ \t]*A[CM]_\\(\\sw\\|\\s_\\)+")
+  ;; FIXME: Should indented macro calls really count as defuns?
+  (setq-local defun-prompt-regexp (rx bol (* (in "\t ")) autoconf--macro))
+  (setq-local open-paren-in-column-0-is-defun-start nil)
   (setq-local comment-start "dnl ")
   ;; We want to avoid matching "dnl" in other text.
   (setq-local comment-start-skip "\\(?:\\(\\W\\|^\\)dnl\\|#\\) +")
   (setq-local syntax-propertize-function
 	      (syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))
-  (setq-local font-lock-defaults
-	      '(autoconf-font-lock-keywords nil nil))
+  (setq-local font-lock-defaults '(autoconf-font-lock-keywords))
   (setq-local imenu-generic-expression autoconf-imenu-generic-expression)
   (setq-local indent-line-function #'indent-relative)
   (setq-local add-log-current-defun-function
diff --git a/test/lisp/progmodes/autoconf-resources/configure.ac b/test/lisp/progmodes/autoconf-resources/configure.ac
new file mode 100644
index 00000000000..b05c556f029
--- /dev/null
+++ b/test/lisp/progmodes/autoconf-resources/configure.ac
@@ -0,0 +1,172 @@
+# Indentation.
+
+AC_PROG_CC
+dnl <- font-lock-keyword-face
+ AC_PROG_CC
+ dnl <- font-lock-keyword-face
+  AC_PROG_CC
+  dnl <- font-lock-keyword-face
+
+# Quoting.
+
+   [AC_PROG_CC] [[AC_PREREQ([2.70])]]
+dnl ^^^^^^^^^^    ^^^^^^^^^ font-lock-keyword-face
+
+# Nesting.
+
+AS_VAR_IF([foo], [bar], [AC_MSG_FAILURE([baz])])
+dnl <- font-lock-keyword-face
+dnl                      ^^^^^^^^^^^^^^ font-lock-keyword-face
+AS_VAR_IF([foo], [bar],
+dnl <- font-lock-keyword-face
+   [AC_MSG_FAILURE([baz])])
+dnl ^^^^^^^^^^^^^^ font-lock-keyword-face
+
+# Autoconf.
+
+AC_PROG_CC AC_PREREQ(2.70) AC_PREREQ([2.70])
+dnl <- font-lock-keyword-face
+dnl        ^^^^^^^^^       ^^^^^^^^^ font-lock-keyword-face
+
+# Autoheader.
+
+AH_HEADER AH_TOP(foo) AH_TOP([foo])
+dnl <- font-lock-keyword-face
+dnl       ^^^^^^      ^^^^^^ font-lock-keyword-face
+
+# Automake.
+
+AM_PATH_LISPDIR AM_SILENT_RULES(yes) AM_SILENT_RULES([yes])
+dnl <- font-lock-keyword-face
+dnl             ^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^ font-lock-keyword-face
+
+# M4sh.
+
+AS_INIT AS_ECHO(foo) AS_ECHO([foo])
+dnl <- font-lock-keyword-face
+dnl     ^^^^^^^      ^^^^^^^ font-lock-keyword-face
+
+# Autoconf Archive.
+
+AX_ADD_FORTIFY_SOURCE AX_SAVE_FLAGS(foo) AX_SAVE_FLAGS([foo])
+dnl <- font-lock-keyword-face
+dnl                   ^^^^^^^^^^^^^      ^^^^^^^^^^^^^ font-lock-keyword-face
+
+# Libtool.
+
+LT_OUTPUT LT_PREREQ(2.4.6) LT_PREREQ([2.4.6])
+dnl <- font-lock-keyword-face
+dnl       ^^^^^^^^^        ^^^^^^^^^ font-lock-keyword-face
+
+# Gnulib.
+
+gl_EARLY gl_WARN_ADD(foo) gl_WARN_ADD([foo])
+dnl <- font-lock-keyword-face
+dnl      ^^^^^^^^^^^      ^^^^^^^^^^^ font-lock-keyword-face
+
+# M4.
+
+changequote(<<, >>) m4_changequote(<<, >>)
+dnl <- font-lock-keyword-face
+dnl                 ^^^^^^^^^^^^^^ !font-lock-keyword-face
+changequote([, ]) m4_changequote([, ])
+dnl <- font-lock-keyword-face
+dnl               ^^^^^^^^^^^^^^ !font-lock-keyword-face
+
+# AC_DEFINE object-like macro.
+
+AC_DEFINE(a) AC_DEFINE(a, d)
+dnl <- font-lock-keyword-face
+dnl          ^^^^^^^^^ font-lock-keyword-face
+dnl       ^            ^ font-lock-variable-name-face
+AC_DEFINE([a]) AC_DEFINE([a], d)
+dnl        ^              ^ font-lock-variable-name-face
+AC_DEFINE([[a]]) AC_DEFINE([[a]], d)
+dnl         ^                ^ font-lock-variable-name-face
+AC_DEFINE(bc) AC_DEFINE(bc, d)
+dnl       ^^            ^^ font-lock-variable-name-face
+AC_DEFINE([bc]) AC_DEFINE([bc], d)
+dnl        ^^              ^^ font-lock-variable-name-face
+AC_DEFINE([[bc]]) AC_DEFINE([[bc]], d)
+dnl         ^^                ^^ font-lock-variable-name-face
+
+# AC_DEFINE function-like macro.
+
+AC_DEFINE(a()) AC_DEFINE(a(), d)
+dnl <- font-lock-keyword-face
+dnl            ^^^^^^^^^ font-lock-keyword-face
+dnl       ^              ^ font-lock-function-name-face
+AC_DEFINE([a()]) AC_DEFINE([a()], d)
+dnl        ^                ^ font-lock-function-name-face
+AC_DEFINE([[a()]]) AC_DEFINE([[a()]], d)
+dnl         ^                  ^ font-lock-function-name-face
+AC_DEFINE(a(x)) AC_DEFINE(a(x), d)
+dnl       ^               ^ font-lock-function-name-face
+AC_DEFINE([a(x)]) AC_DEFINE([a(x)], d)
+dnl        ^                 ^ font-lock-function-name-face
+AC_DEFINE([[a(x)]]) AC_DEFINE([[a(x)]], d)
+dnl         ^                   ^ font-lock-function-name-face
+AC_DEFINE(a(x, y)) AC_DEFINE(a(x, y), d)
+dnl       ^                  ^ font-lock-function-name-face
+AC_DEFINE([a(x, y)]) AC_DEFINE([a(x, y)], d)
+dnl        ^                    ^ font-lock-function-name-face
+AC_DEFINE([[a(x, y)]]) AC_DEFINE([[a(x, y)]], d)
+dnl         ^                      ^ font-lock-function-name-face
+
+# AC_DEFINE_UNQUOTED object-like macro.
+
+AC_DEFINE_UNQUOTED(a) AC_DEFINE_UNQUOTED(a, d)
+dnl <- font-lock-keyword-face
+dnl                   ^^^^^^^^^^^^^^^^^^ font-lock-keyword-face
+dnl                ^                     ^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([a]) AC_DEFINE_UNQUOTED([a], d)
+dnl                 ^                       ^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([[a]]) AC_DEFINE_UNQUOTED([[a]], d)
+dnl                  ^                         ^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED(bc) AC_DEFINE_UNQUOTED(bc, d)
+dnl                ^^                     ^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([bc]) AC_DEFINE_UNQUOTED([bc], d)
+dnl                 ^^                       ^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([[bc]]) AC_DEFINE_UNQUOTED([[bc]], d)
+dnl                  ^^                         ^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED(\a`b`$c${d})
+dnl                ^^^^^^^^^^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([\a`b`$c${d}])
+dnl                 ^^^^^^^^^^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([[\a`b`$c${d}]])
+dnl                  ^^^^^^^^^^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED(\a`b`$c${d}, e)
+dnl                ^^^^^^^^^^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([\a`b`$c${d}], e)
+dnl                 ^^^^^^^^^^^ font-lock-variable-name-face
+AC_DEFINE_UNQUOTED([[\a`b`$c${d}]], e)
+dnl                  ^^^^^^^^^^^ font-lock-variable-name-face
+
+# Variable definition.
+
+AC_SUBST(a) AC_SUBST(a, b)
+dnl <- font-lock-keyword-face
+dnl         ^^^^^^^^ font-lock-keyword-face
+dnl      ^           ^ font-lock-variable-name-face
+AH_TEMPLATE(a, b) AH_VERBATIM(a, b)
+dnl <- font-lock-keyword-face
+dnl               ^^^^^^^^^^^ font-lock-keyword-face
+dnl         ^                 ^font-lock-variable-name-face
+AM_CONDITIONAL(a, b) AM_MISSING_PROG(a, b)
+dnl <- font-lock-keyword-face
+dnl                  ^^^^^^^^^^^^^^^ font-lock-keyword-face
+dnl            ^                     ^ font-lock-variable-name-face
+
+# Function definition.
+
+AC_DEFUN(a) AC_DEFUN(a, b)
+dnl <- font-lock-keyword-face
+dnl         ^^^^^^^^ font-lock-keyword-face
+dnl      ^           ^ font-lock-function-name-face
+AC_DEFUN_ONCE(a, b)
+dnl <- font-lock-keyword-face
+dnl           ^ font-lock-function-name-face
+AU_ALIAS(a, b) AU_DEFUN(a, b)
+dnl <- font-lock-keyword-face
+dnl            ^^^^^^^^ font-lock-keyword-face
+dnl      ^              ^ font-lock-function-name-face
diff --git a/test/lisp/progmodes/autoconf-tests.el b/test/lisp/progmodes/autoconf-tests.el
index d4c99218fa0..df20986fc52 100644
--- a/test/lisp/progmodes/autoconf-tests.el
+++ b/test/lisp/progmodes/autoconf-tests.el
@@ -20,36 +20,44 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
-;;; Commentary:
-
-;;
-
 ;;; Code:
 
 (require 'autoconf)
 (require 'ert)
+(require 'ert-font-lock)
 
 (ert-deftest autoconf-tests-current-defun-function-define ()
   (with-temp-buffer
+    (autoconf-mode)
     (insert "AC_DEFINE([HAVE_RSVG], [1], [Define to 1 if using librsvg.])")
+    (let ((def "HAVE_RSVG"))
+      (search-backward def)
+      (should (equal (autoconf-current-defun-function) def)))
     (goto-char (point-min))
-    (should-not (autoconf-current-defun-function))
-    (forward-char 11)
-    (should (equal (autoconf-current-defun-function) "HAVE_RSVG"))))
+    (should-not (autoconf-current-defun-function))))
 
 (ert-deftest autoconf-tests-current-defun-function-subst ()
   (with-temp-buffer
+    (autoconf-mode)
     (insert "AC_SUBST([srcdir])")
+    (let ((def "srcdir"))
+      (search-backward def)
+      (should (equal (autoconf-current-defun-function) "srcdir")))
     (goto-char (point-min))
-    (should-not (autoconf-current-defun-function))
-    (forward-char 10)
-    (should (equal (autoconf-current-defun-function) "srcdir"))))
+    (should-not (autoconf-current-defun-function))))
 
 (ert-deftest autoconf-tests-autoconf-mode-comment-syntax ()
   (with-temp-buffer
     (autoconf-mode)
-    (insert "dnl  Autoconf script for GNU Emacs")
-    (should (nth 4 (syntax-ppss)))))
+    (dolist (start '("dnl" "#"))
+      (insert start "  Autoconf script for GNU Emacs")
+      (should (eq (syntax-ppss-context (syntax-ppss)) 'comment))
+      (insert "\n")
+      (should-not (syntax-ppss-context (syntax-ppss))))))
+
+(ert-font-lock-deftest-file autoconf-tests-font-lock
+  "Test `autoconf-mode' font lock."
+  autoconf-mode "configure.ac")
 
 (provide 'autoconf-tests)
 ;;; autoconf-tests.el ends here
-- 
2.47.2


--=-=-=
Content-Type: text/plain


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.2, Xaw3d scroll bars) of 2025-02-16 built on tais
Repository revision: fc189cb83cf7284344a737e75b3ee56487b1c386
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101015
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure 'CFLAGS=-Og -ggdb3' -C --prefix=/home/blc/.local
 --enable-checking=structs --without-native-compilation
 --with-file-notification --with-x-toolkit=lucid --with-x'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINERAMA XINPUT2
XPM XRANDR LUCID ZLIB

Important settings:
  value of $LANG: en_IE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty move-toolbar make-network-process tty-child-frames
emacs)

Memory information:
((conses 16 39874 9371) (symbols 48 5391 0) (strings 32 13472 1563)
 (string-bytes 1 318133) (vectors 16 9452)
 (vector-slots 8 113642 8578) (floats 8 23 3) (intervals 56 268 0)
 (buffers 992 10))

--=-=-=--




Acknowledgement sent to "Basil L. Contovounesios" <basil@HIDDEN>:
New bug report received and forwarded. Copy sent to eggert@HIDDEN, fx@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to eggert@HIDDEN, fx@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#76373; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 19 Feb 2025 20:00:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.