[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69069: 14.0.2; table alignment by align-current gives wrong result
From: |
Ikumi Keita |
Subject: |
bug#69069: 14.0.2; table alignment by align-current gives wrong result |
Date: |
Thu, 15 Feb 2024 16:36:47 +0900 |
>>>>> Ikumi Keita <ikumi@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
Description: Improve pseudo-parent mode facility for emacs<30
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Uwe Siart, 2024/02/12
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Ikumi Keita, 2024/02/12
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Uwe Siart, 2024/02/12
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Ikumi Keita, 2024/02/12
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Tassilo Horn, 2024/02/13
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Ikumi Keita, 2024/02/13
- bug#69069: 14.0.2; table alignment by align-current gives wrong result,
Ikumi Keita <=
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Ikumi Keita, 2024/02/16
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Tassilo Horn, 2024/02/20
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Uwe Siart, 2024/02/20
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Ikumi Keita, 2024/02/20
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Tassilo Horn, 2024/02/20
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Uwe Siart, 2024/02/20
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Tassilo Horn, 2024/02/20
- bug#69069: 14.0.2; table alignment by align-current gives wrong result, Ikumi Keita, 2024/02/20