





















| author | Arash Esbati <arash@gnu.org> | 2026-07-03 12:00:51 +0200 |
|---|---|---|
| committer | Arash Esbati <arash@gnu.org> | 2026-07-03 14:10:00 +0200 |
| commit | 18623e2704230a1c8e4d5277962755c9fafe318c (patch) | |
| tree | 705ef3d4934d4f736f479461e9497fc2728fe70e | |
| parent | f2b02da5e97d1aab3bb5ff7b0447e0a572cf58e2 (diff) | |
Activate new xref backend
* tex.el (TeX-mode): Activate the new xref backend provided in Emacs 31 as suggested by David Fussner <dfussner@googlemail.com>.
| -rw-r--r-- | tex.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tex.el b/tex.el
index 7bbd7a07a78..545d30f95e6 100644
--- a/tex.el
+++ b/tex.el
@@ -64,6 +64,7 @@
(declare-function comint-mode "ext:comint" nil)
(declare-function tex--prettify-symbols-compose-p "ext:tex-mode"
(start end match))
+(declare-function tex--xref-backend "ext:tex-mode" nil)
(declare-function gnuserv-start "ext:gnuserv"
(&optional leave-dead) t)
@@ -3871,6 +3872,10 @@ Not intended for direct use for user."
(add-function :override (local 'prettify-symbols-compose-predicate)
#'TeX--prettify-symbols-compose-p)
+ ;; Activate new xref backend introduced in Emacs 31:
+ (when (>= emacs-major-version 31)
+ (add-hook 'xref-backend-functions #'tex--xref-backend nil t))
+
;; Standard Emacs completion-at-point support
(add-hook 'completion-at-point-functions
#'TeX--completion-at-point nil t)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。