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?