unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: 54663@debbugs.gnu.org
Cc: henri@henrimenke.de
Subject: bug#54663: 29.0.50; align-current changed behavior
Date: Fri, 01 Apr 2022 10:16:22 +0200	[thread overview]
Message-ID: <87o81lte09.fsf@gmx.net> (raw)
In-Reply-To: <a2cb0b2cbc9fe89a273649c30481166cc11c602b.camel@henrimenke.de> (Henri Menke via's message of "Fri, 01 Apr 2022 02:37:27 +0000")

On Fri, 01 Apr 2022 02:37:27 +0000 Henri Menke via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> wrote:

> Somewhere between version 27.1 and 29.0.50 the `align' command changed
> its behavior. Examples below are executed in emacs -Q.
>
> Consider the following file `test.tex':
>
>    \documentclass{article}
>    \begin{document}
>    \begin{tabular}{lr}
>      abc def & zzz \\
>      foo & bar \\
>    \end{tabular}
>    \end{document}
>
> Opening this file in 27.1 and using M-x align-current yields the
> expected
>
>    \documentclass{article}
>    \begin{document}
>    \begin{tabular}{lr}
>      abc def & zzz \\
>      foo     & bar \\
>    \end{tabular}
>    \end{document}
>
> but opening the file in 29.0.50 and using M-x align-current produces
> something weird:
>
>    \documentclass{article}
>    \begin{document}
>    \begin{tabular}{lr}
>     abc def   & zzz \\
>     foo & bar \\
>    \end{tabular}
>    \end{document}
>
> There is only a single space of indentation and alignment is now at
> spaces instead of & and \\ as expected for align-tex-modes.

If I debugged this correctly, this behavior change is due to this
commit:

commit 90266b8356dc5e7e6e437fb37b49970205b01408
Author:     Lars Ingebrigtsen <larsi@gnus.org>
Commit:     Lars Ingebrigtsen <larsi@gnus.org>
CommitDate: Tue Oct 19 22:39:05 2021 +0200

    Tweak how 'align' and 'align-regexp' align text

    * lisp/align.el (align-rules-list): Change to work without `C-u'.

diff --git a/lisp/align.el b/lisp/align.el
index 7ced7b7044..2fd6dcda6d 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -553,8 +553,7 @@ align-rules-list
      (modes    . align-text-modes)
      (repeat   . t)
      (run-if   . ,(lambda ()
-                    (and current-prefix-arg
-                         (not (eq '- current-prefix-arg))))))
+                    (not (eq '- current-prefix-arg)))))

Steve Berman





  reply	other threads:[~2022-04-01  8:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01  2:37 bug#54663: 29.0.50; align-current changed behavior Henri Menke via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-01  8:16 ` Stephen Berman [this message]
2022-04-02 14:36   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o81lte09.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=54663@debbugs.gnu.org \
    --cc=henri@henrimenke.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).