Subject: Re: bug#69187: 29.2; Poor compatibility in align.el

From: Arash Esbati <[email-masked]>
Date: Sat, 06 Apr 2024 22:14:46 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Ikumi Keita <[email-masked]>
>> 
>> >   . what is the rationale for not using align-tex-modes here, only
>> >     latex-mode?
>> 
>> Because the current `tex-tabbing-separator' entry in `align-rules-list'
>> excludes other modes by `run-if' form.

Which is correct, in general.  The tabbing environment looks like this
and is only available in LaTeX and not in other formats (AFAICT):

\begin{tabbing}
  Zero \=One \=Two \=Three\\
  \>First tab stop\\
  \>A\>\>B\\
  \>\>Second tab stop
\end{tabbing}

And the rule is designed to match these separators.

> Then I'm okay with installing the proposed change.

Thanks, the change is attached; I can push it myself, or you can do it
in case you want to change the commit message etc.  I will close the
report once the change is installed.

@Keita: Thanks for the report and answering Eli's questions.

Best, Arash
>From 76f30b873a0e358606ad92e2df799e5c0cea474d Mon Sep 17 00:00:00 2001
From: Arash Esbati <[email-masked]>
Date: Sat, 6 Apr 2024 21:58:03 +0200
Subject: [PATCH] Fix tex-tabbing-separator alignment rule

* lisp/align.el (align-rules-list): Remove the check of
`latex-mode' with `eq' which doesn't work with newer AUCTeX mode
names and modes defined by user with `define-derived-mode'.
(bug#69187)
---
 lisp/align.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/align.el b/lisp/align.el
index 81ccc4b5e2d..0e77a857585 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -537,10 +537,8 @@ align-rules-list
      (regexp   . ,(lambda (end reverse)
                     (align-match-tex-pattern "\\\\[=>]" end reverse)))
      (group    . (1 2))
-     (modes    . align-tex-modes)
-     (repeat   . t)
-     (run-if   . ,(lambda ()
-                    (eq major-mode 'latex-mode))))
+     (modes    . '(latex-mode))
+     (repeat   . t))
 
     (tex-record-break
      (regexp   . "\\(\\s-*\\)\\\\\\\\")
-- 
2.44.0