[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 32fe3f2c3b 01/10: Cater for former mode name in
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 32fe3f2c3b 01/10: Cater for former mode name in customized `TeX-command-list' |
Date: |
Tue, 20 Feb 2024 01:10:14 -0500 (EST) |
branch: externals/auctex
commit 32fe3f2c3b1972f635ae6273391e30b6ac085ed8
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Cater for former mode name in customized `TeX-command-list'
* tex.el (TeX-mode-comparison-alist): Comparison table for former and
new mode names.
(TeX-mode-specific-command-list): Compare the former mode name as well
against the mode list in `TeX-command-list'.
---
tex.el | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/tex.el b/tex.el
index 49723108ea..17cb1aa9a0 100644
--- a/tex.el
+++ b/tex.el
@@ -103,6 +103,19 @@
(defvar compilation-error-regexp-alist) ; compile.el
(defvar compilation-in-progress) ; compile.el
+(defconst TeX-mode-comparison-alist
+ '((plain-tex-mode . plain-TeX-mode)
+ (latex-mode . LaTeX-mode)
+ (doctex-mode . docTeX-mode)
+ (context-mode . ConTeXt-mode)
+ (texinfo-mode . Texinfo-mode)
+ (ams-tex-mode . AmSTeX-mode)
+ (japanese-plain-tex-mode . japanese-plain-TeX-mode)
+ (japanese-latex-mode . japanese-LaTeX-mode))
+ "Comparison table of AUCTeX former and current mode names.
+Each entry is of the form (FORMER . CURRENT) where FORMER and
+CURRENT are each mode name symbols.")
+
(defgroup TeX-file nil
"Files used by AUCTeX."
:group 'AUCTeX)
@@ -5207,12 +5220,20 @@ Brace insertion is only done if point is in a math
construct and
"Return the list of commands available in the given MODE."
(let ((full-list TeX-command-list)
out-list
- entry)
+ entry fourth-element
+ former-mode)
(while (setq entry (pop full-list))
+ (setq fourth-element (nth 4 entry))
;; `(nth 4 entry)' may be either an atom in case of which the
;; entry should be present in any mode or a list of major modes.
- (if (or (atom (nth 4 entry))
- (memq mode (nth 4 entry)))
+ (if (or (atom fourth-element)
+ (memq mode fourth-element)
+ ;; Compatibility for former mode names. The user can
+ ;; have customized `TeX-command-list' with former mode
+ ;; names listed in `(nth 4 entry)'.
+ (and (setq former-mode
+ (car (rassq mode TeX-mode-comparison-alist)))
+ (memq former-mode fourth-element)))
(push entry out-list)))
(nreverse out-list)))
- [elpa] externals/auctex updated (b3e1ab1b9f -> 59d74b08a5), Tassilo Horn, 2024/02/20
- [elpa] externals/auctex 299cf53d24 05/10: * style/cancel.el (LaTeX-cancel-package-options): Fix options., Tassilo Horn, 2024/02/20
- [elpa] externals/auctex 4b77d8ebaa 02/10: * doc/faq.texi: Add FAQ entry for ELPA upgrade failure., Tassilo Horn, 2024/02/20
- [elpa] externals/auctex 6c18df7f10 09/10: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2024/02/20
- [elpa] externals/auctex b95c47a1c2 07/10: Fix and enhance pseudo-parent mode facility (bug#69069), Tassilo Horn, 2024/02/20
- [elpa] externals/auctex 32fe3f2c3b 01/10: Cater for former mode name in customized `TeX-command-list',
Tassilo Horn <=
- [elpa] externals/auctex 49f46a2c4f 08/10: Fix position of `LaTeX--arguments-completion-at-point', Tassilo Horn, 2024/02/20
- [elpa] externals/auctex d150b0f1b1 06/10: ; Add comments, Tassilo Horn, 2024/02/20
- [elpa] externals/auctex 09a181fa14 04/10: Increase description of `TeX-modes' in the document, Tassilo Horn, 2024/02/20
- [elpa] externals/auctex 59d74b08a5 10/10: Regenerate after merge from master, Tassilo Horn, 2024/02/20
- [elpa] externals/auctex fd7b5aacfa 03/10: ; * doc/faq.texi: Update copyright year., Tassilo Horn, 2024/02/20