From 496d3d07c28cdc6a9fe25bb3dc77005da98a0b6b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 3 Oct 2024 08:52:43 +0200 Subject: [PATCH] Remove some Semantic mentions --- doc/emacs/maintaining.texi | 2 +- lisp/textmodes/tex-mode.el | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 90139e9d3c6..74ee4db00fe 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -2552,7 +2552,7 @@ When invoked in a buffer whose major mode uses the @code{etags} backend, @kbd{M-?} searches files and buffers whose major mode matches that of the original buffer. It guesses that mode from file extensions, so if @kbd{M-?} seems to be skipping relevant buffers or files, try -customizing either the variable @code{semantic-symref-filepattern-alist} +customizing either the variable @code{grep-filepattern-alist} (if your buffer's major mode already has an entry in it), or @code{auto-mode-alist} (if not), thereby informing @code{xref} of the missing extensions (@pxref{Choosing Modes}). diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 6fc49800018..f2787936599 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -3814,16 +3814,14 @@ There might be text before point." ;; Emacs and `etags' this way aims to improve the user experience "out ;; of the box." -;; Populate `semantic-symref-filepattern-alist' for the in-tree modes; -;; AUCTeX is doing the same for its modes. -(with-eval-after-load 'semantic/symref/grep - (defvar semantic-symref-filepattern-alist) +(with-eval-after-load 'grep + (defvar grep-filepattern-alist) (push '(latex-mode "*.[tT]e[xX]" "*.ltx" "*.sty" "*.cl[so]" "*.bbl" "*.drv" "*.hva") - semantic-symref-filepattern-alist) + grep-filepattern-alist) (push '(plain-tex-mode "*.[tT]e[xX]" "*.ins") - semantic-symref-filepattern-alist) - (push '(doctex-mode "*.dtx") semantic-symref-filepattern-alist)) + grep-filepattern-alist) + (push '(doctex-mode "*.dtx") grep-filepattern-alist)) (defun tex--xref-backend () 'tex-etags) @@ -3987,8 +3985,8 @@ There might be text before point." (cl-defmethod xref-backend-references ((_backend (eql 'tex-etags)) identifier) "Find references of IDENTIFIER in TeX buffers and files." - (require 'semantic/symref/grep) - (defvar semantic-symref-filepattern-alist) + (require 'grep) + (defvar grep-filepattern-alist) (let (bufs texbufs (mode major-mode)) (dolist (buf (buffer-list)) @@ -3998,7 +3996,7 @@ There might be text before point." (push buf texbufs)))) (unless (seq-set-equal-p tex--buffers-list bufs) (let* ((amalist (tex--collect-file-extensions)) - (extlist (alist-get mode semantic-symref-filepattern-alist)) + (extlist (alist-get mode grep-filepattern-alist)) (extlist-new (seq-uniq (seq-union amalist extlist #'string-match-p)))) (setq tex--buffers-list bufs) @@ -4010,7 +4008,7 @@ There might be text before point." extlist-new))) ((push finext extlist-new))))) (unless (seq-set-equal-p extlist-new extlist) - (setf (alist-get mode semantic-symref-filepattern-alist) + (setf (alist-get mode grep-filepattern-alist) extlist-new)))) (let* (setsyntax (punct (with-syntax-table (tex-find-references-syntax-table) -- 2.39.2