[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 5085351645: * lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTe
From: |
Stefan Monnier |
Subject: |
emacs-28 5085351645: * lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTeX regression |
Date: |
Tue, 20 Sep 2022 09:58:57 -0400 (EDT) |
branch: emacs-28
commit 5085351645dc503150823660443f497c5cf8d2ec
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTeX regression
As discussed in
https://lists.gnu.org/r/auctex/2022-08/msg00004.html
AUCTeX installs its own advice to redefine `tex-mode`, and that
advice used to take precedence before commit 6075a7c5ae3fa456cd.
---
lisp/textmodes/tex-mode.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 64e38ad697..587ec406ef 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1013,7 +1013,10 @@ such as if there are no commands in the file, the value
of `tex-default-mode'
says which mode to use."
(tex-common-initialization))
-(advice-add 'tex-mode :around #'tex--redirect-to-submode)
+(advice-add 'tex-mode :around #'tex--redirect-to-submode
+ ;; Give it lower precedence than normal advice, so
+ ;; AUCTeX's advice takes precedence over it.
+ '((depth . 50)))
(defvar tex-mode--recursing nil)
(defun tex--redirect-to-submode (orig-fun)
"Redirect to one of the submodes when called directly."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 5085351645: * lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTeX regression,
Stefan Monnier <=