Hi David,

David Fussner <[email protected]> writes:

> I'm attaching the revised patch with docstring, as requested. I also
> fixed a typo in the docstring of `bib-cite-search-ring', which was
> nearby. Hope that's OK, and let me know if any changes are required.

many thanks for the new version.  I installed that change.  I would also
install the patch attached.  Ok for you?

Best, Arash
>From 5bdbc2e12914554e32e1372050824452e8fa4a7d Mon Sep 17 00:00:00 2001
From: Arash Esbati <[email protected]>
Date: Fri, 3 Jul 2026 12:00:51 +0200
Subject: [PATCH] Activate new xref backend

* tex.el (TeX-mode): Activate the new xref backend provided in
Emacs 31 as suggested by David Fussner <[email protected]>.
---
 tex.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tex.el b/tex.el
index 7bbd7a07..545d30f9 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)
-- 
2.55.0

Reply via email to