emacs/test/lisp/progmodes
Basil L. Contovounesios 2e3cf73e05 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.
2025-02-17 17:28:05 -08:00
..
autoconf-resources Improve autoconf-mode macro detection 2025-02-17 17:28:05 -08:00
c-ts-mode-resources Fix c-ts-mode indentation (bug#75442) 2025-01-12 22:23:36 -08:00
cperl-mode-resources ; cperl-mode.el: Add a test for Bug#74245 2025-01-13 17:07:51 +01:00
csharp-mode-resources Fix last change 2024-04-25 18:59:25 +03:00
elisp-mode-resources lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption. 2021-11-08 07:38:41 +01:00
elixir-ts-mode-resources ; Fix typos 2024-01-28 17:11:51 +01:00
flymake-resources Send useless output in flymake-tests to /dev/null (bug#70716) 2024-08-28 19:47:40 +02:00
go-ts-mode-resources Add go-work-ts-mode for Go workspace files 2025-02-12 06:46:58 +01:00
heex-ts-mode-resources Add expression handling to heex-ts-mode 2025-01-03 09:41:15 +01:00
java-ts-mode-resources java-ts-mode: Indentation for opening brace on a separate line 2024-02-17 22:35:16 +02:00
js-resources Add indentation rules for bracketless statements in js-ts-mode 2023-12-12 03:13:12 +02:00
lua-ts-mode-resources Improve comment indenting in 'lua-ts-mode' 2024-11-14 10:14:46 +02:00
project-resources Bring back the project--value-in-dir logic 2022-12-09 18:19:36 +02:00
ruby-mode-resources Support the new option in ruby-ts-mode too 2024-09-02 21:57:35 +03:00
rust-ts-mode-resources Rust ts: fontify as type the possible suffix of number literals 2024-11-23 14:56:38 +02:00
sh-script-resources Make sh-script-tests.el more robust 2024-04-05 19:43:56 +02:00
typescript-ts-mode-resources Improve one test (bug#71998) 2024-07-21 14:55:06 +02:00
xref-resources Speed up xref rendering for matches on very long lines 2021-03-08 04:25:15 +02:00
asm-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
autoconf-tests.el Improve autoconf-mode macro detection 2025-02-17 17:28:05 -08:00
bat-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bug-reference-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
c-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cc-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
compile-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cperl-mode-tests.el Merge from origin/emacs-30 2025-01-18 07:46:34 -05:00
csharp-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
eglot-tests.el Eglot: skip Tramp tests except on Emacs 28+ 2025-01-23 15:52:07 +00:00
elisp-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
elixir-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
etags-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
executable-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
f90-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
flymake-tests.el Flymake: more ambitious cleanup in flymake-mode (bug#69809) 2025-01-14 17:47:17 +00:00
gdb-mi-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
glasses-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
go-ts-mode-tests.el Fix recently introduced test failure 2025-02-12 17:41:37 +01:00
grep-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
heex-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
hideshow-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
java-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
js-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
lua-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
octave-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
opascal-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pascal-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
peg-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
perl-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
project-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ps-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
python-tests.el Fix string end search in python-nav-end-of-statement 2025-02-15 13:24:59 +02:00
ruby-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ruby-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
rust-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
scheme-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
sh-script-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
sql-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
subword-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tcl-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
typescript-ts-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
which-func-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
xref-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00