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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Apr 2024 09:21:18 +0300

> Cc: [email-masked]
> From: Arash Esbati <[email-masked]>
> Date: Fri, 05 Apr 2024 21:59:06 +0200
> 
> Ikumi Keita <[email-masked]> writes:
> 
> > That would practically do the job as well, because this entry wouldn't
> > be relevant in buffers in modes other than latex (LaTeX) mode
> > actually. My proposal is just to keep the precise behavior the same.
> 
> Agreed, so the change would look like this, right?
> 
> --8<---------------cut here---------------start------------->8---
> 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-*\\)\\\\\\\\")
> --8<---------------cut here---------------end--------------->8---
> 
> @Maintainers: How do you want to proceed with this proposal?  Do you
> like to ask John W., or should I prepare a patch and send/install it, or
> anything else?
> 
> For bonus points, I offer to delete the unnecessary ":group 'align" in
> the defcustom's in align.el.
> 
> Please advise.  Thanks.

Please explain the issue in more detail and in terms that someone who
doesn't use AUCTeX and has only superficial understanding of align.el
can understand and reason about.

Three questions that pop up immediately, perhaps because I'm missing
something:

  . what is the rationale for not using align-tex-modes here, only
    latex-mode?
  . why not just add the new LaTeX-mode to the list in
    align-tex-modes, so that people who use an old AUCTeX will not
    have their align rules broken?
  . why not use derived-mode-p instead of 'equal' in the run-if form
    (and why remove it in the first place)?

(And, btw, why did AUCTeX change the name of the mode?  What useful
purpose could that possibly serve?  Changing names of major modes is
the last thing I'd expect from a veteran package that respects its
users.)