GNU bug report logs -
#69069
14.0.2; table alignment by align-current gives wrong result
Previous Next
Reported by: Uwe Siart <uwe.siart <at> tum.de>
Date: Mon, 12 Feb 2024 07:33:02 UTC
Severity: normal
Found in version 14.0.2
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>>>>> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> The point is that AUCTeX should extend this follow-up on
> `derived-mode-p' to `provided-mode-derived-p'. I'll explain the detail
> in a few days.
Here we go.
1. In my feature branch and current AUCTeX, I added pseudo-parent mode
facility[1][2] like emacs 30 in order to have compatibility with
directory local variable entry prepared for former mode names like
`latex-mode'.
2. That facility only concerns for `derived-mode-p' and doesn't tweak
`provided-mode-derived-p'. However, the `run-if' property of
`text-colum' entry in `align-rules-list'[3] uses
`provided-mode-derived-p'. This discrepancy calls for a spurious
alignment is in `LaTeX-mode' because it isn't considered as derived
from modes listed in `align-tex-modes'
3. This spurious alignment doen't occur in emacs 30 since it overhauls
`provided-mode-derived-p' in depth.
4. The attached patch improves the pseudo-parent mode facility to cover
`provided-mode-derived-p' as well, and fix this bug.
5. The entry `tex-tabbing-separator' in `align-rules-list'[4] has to be
fixed because its `run-if' property contains conditional with repect
to the major mode without `derived-mode-p' nor
`provided-mode-derived-p'. I'll file a bug report for this.
[1] `TeX-derived-mode-add-parents'
[2] advice for `derived-mode-p' by `TeX--compat-derived-mode-p'
[3]-------------------------------------------------------------------
;; Align space delimited text as columns.
(text-column
(regexp . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
(group . 2)
(modes . align-text-modes)
(repeat . t)
(run-if . ,(lambda ()
(and (not (eq '- current-prefix-arg))
(not (apply #'provided-mode-derived-p
major-mode align-tex-modes))))))
----------------------------------------------------------------------
[4]-------------------------------------------------------------------
(tex-tabbing-separator
(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))))
----------------------------------------------------------------------
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
[diff (text/x-diff, attachment)]
This bug report was last modified 1 year and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.