@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}).
;; 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)
(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))
(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)
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)