branch: master
commit 56debb635d3d768500c86bce54cf4eaf42502e86
Author: David Fussner <dfuss...@googlemail.com>
Commit: Ikumi Keita <ik...@ikumi.que.jp>

    Populate `semantic-symref-filepattern-alist' (bug#71245)
    
    * context.el:
    * latex.el:
    * plain-tex.el: Make sure all modes have an entry in the alist, and also
    that the ".tex" extension is included where necessary.
---
 context.el   |  7 +++++++
 latex.el     |  3 ++-
 plain-tex.el | 14 ++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/context.el b/context.el
index 8b0c88ee..0caab223 100644
--- a/context.el
+++ b/context.el
@@ -1861,6 +1861,13 @@ that is, you do _not_ have to cater for this yourself by 
adding \\\\\\=' or $."
 
 (TeX-abbrev-mode-setup ConTeXt-mode context-mode-abbrev-table)
 
+(defvar semantic-symref-filepattern-alist) ; Silence compiler
+(with-eval-after-load 'semantic/symref/grep
+  ;; This entry is necessary for M-? to work.
+  ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00002.html>
+  ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00005.html>
+  (push '(ConTeXt-mode "*.[tT]e[xX]") semantic-symref-filepattern-alist))
+
 (defun ConTeXt-mode-common-initialization ()
   "Initialization code that is common for all ConTeXt interfaces."
   (plain-TeX-common-initialization)
diff --git a/latex.el b/latex.el
index d0a9ee6f..ba759291 100644
--- a/latex.el
+++ b/latex.el
@@ -8195,7 +8195,8 @@ This happens when \\left is inserted."
   ;; This entry is necessary for M-? to work.
   ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00002.html>
   ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00005.html>
-  (push '(LaTeX-mode "*.ltx" "*.sty" "*.cls" "*.clo" "*.bbl" "*.drv" "*.hva")
+  (push '(LaTeX-mode "*.[tT]e[xX]" "*.ltx" "*.sty" "*.cl[so]" "*.bbl"
+                     "*.drv" "*.hva")
         semantic-symref-filepattern-alist))
 
 (declare-function LaTeX-preview-setup "preview")
diff --git a/plain-tex.el b/plain-tex.el
index 2b777869..9bd48eb3 100644
--- a/plain-tex.el
+++ b/plain-tex.el
@@ -118,6 +118,14 @@ plain-TeX file, or any mode derived thereof.  See variable
 
 (TeX-abbrev-mode-setup plain-TeX-mode plain-tex-mode-abbrev-table)
 
+(defvar semantic-symref-filepattern-alist) ; Silence compiler
+(with-eval-after-load 'semantic/symref/grep
+  ;; This entry is necessary for M-? to work.
+  ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00002.html>
+  ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00005.html>
+  (push '(plain-TeX-mode "*.[tT]e[xX]" "*.ins")
+        semantic-symref-filepattern-alist))
+
 ;; Delete alias predefined in tex-mode.el so that AUCTeX autoload
 ;; takes precedence.
 ;;;###autoload (if (eq (symbol-function 'plain-TeX-mode) 'plain-tex-mode)
@@ -318,6 +326,12 @@ that is, you do _not_ have to cater for this yourself by 
adding \\\\\\=' or $."
   :type 'hook
   :group 'TeX-misc)
 
+(with-eval-after-load 'semantic/symref/grep
+  ;; This entry is necessary for M-? to work.
+  ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00002.html>
+  ;; <URL:https://lists.gnu.org/r/auctex-devel/2023-09/msg00005.html>
+  (push '(AmSTeX-mode "*.[tT]e[xX]") semantic-symref-filepattern-alist))
+
 ;;;###autoload
 (define-derived-mode AmSTeX-mode plain-TeX-mode "AmS-TeX"
   "Major mode in AUCTeX for editing AmSTeX files.

Reply via email to