Subject: Re: bug#76373: 31.0.50; Extend autoconf-mode macro support

From: Paul Eggert <[email-masked]>
Date: Mon, 17 Feb 2025 17:32:57 -0800

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.