emacs/lisp/textmodes
David Fussner b44c00669a Provide a modified xref backend for TeX buffers
In addition to providing a new `xref' backend, the patch also improves
the general handling of expl3 syntax.  Expl3 is the next-generation
LaTeX specification, and has for some time been available by default in
the LaTeX kernel.  The new syntax co-exists in many files with the
standard LaTeX2e syntax, so we try at least minimally to separate the
way modes handle the two specifications, both to reduce
visually-disturbing interference between them and also to improve the
`xref' backend.  (Bug#53749)

* lib-src/etags.c (TeX_commands): Improve parsing of commands in TeX
buffers.
(TEX_defenv): Expand list of commands to tag by default in TeX buffers.
(TeX_help):
* doc/emacs/maintaining.texi (Tag Syntax): Document new tagged commands.
(Identifier Search): Add note about semantic-symref-filepattern-alist,
auto-mode-alist, and xref-find-references.

* lisp/textmodes/tex-mode.el (tex-font-lock-suscript): Test for
underscore in expl3 files and regions, disable subscript face there.
(tex-common-initialization): Set up xref backend for in-tree TeX modes.
Detect expl3 files, and in others set up a list of expl3 regions.
(tex-expl-buffer-parse): New function called in previous.
(tex-expl-buffer-p): New variable to hold the result of previous.
(tex-expl-region-set): New function added to
'syntax-propertize-extend-region-functions' hook.
(tex-expl-region-list): New variable to hold the result of previous.
(tex--xref-backend): New function to identify the xref backend.
(tex--thing-at-point, tex-thingatpt--beginning-of-symbol)
(tex-thingatpt--end-of-symbol, tex--bounds-of-symbol-at-point):
New functions to return 'thing-at-point' for xref backend.
(tex-thingatpt-exclude-chars): New variable to do the same.
(xref-backend-identifier-at-point): New TeX backend method to provide
symbols for processing by xref.
(xref-backend-identifier-completion-table)
(xref-backend-identifier-completion-ignore-case)
(xref-backend-definitions, xref-backend-apropos): Placeholders to
call the standard 'etags' xref backend methods.
(xref-backend-references): Wrapper to call the default xref backend
method, finding as many relevant files as possible and using a bespoke
syntax-propertize-function when required.
(tex--collect-file-extensions, tex-xref-syntax-function): Helper
functions for previous.
(tex-find-references-syntax-table, tex--buffers-list)
(tex--xref-syntax-fun, tex--old-syntax-function): New variables for
the same.
2024-09-14 17:05:33 +02:00
..
artist.el Fix misspelled symbols in artist.el 2024-06-12 18:17:13 +02:00
bib-mode.el
bibtex-style.el
bibtex.el Fix bibtex validation for non-file buffers 2024-07-20 12:48:04 +03:00
conf-mode.el (conf-toml-recognize-section): Fix bug#70383 2024-04-17 14:30:10 -04:00
css-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
dns-mode.el
emacs-authors-mode.el
emacs-news-mode.el Improve 'C-h o' in NEWS files 2024-08-31 12:12:00 +03:00
enriched.el Fix decoding 'display' properties with SVG images in Enriched mode 2024-07-14 09:06:55 +03:00
fill.el
flyspell.el ; Fix documentation of 'flyspell-check-changes' 2024-03-15 10:44:23 +02:00
glyphless-mode.el
html-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
ispell.el Delete matching of whitespace in ispell's LaTeX env names 2024-08-17 11:14:47 +03:00
less-css-mode.el Standardize possessive apostrophe usage in manuals, docs, and comments 2024-07-25 03:35:18 +02:00
makeinfo.el
mhtml-mode.el Checkdoc fixes in textmodes/*.el 2024-07-08 17:24:54 +02:00
nroff-mode.el
page-ext.el Update FSF's address 2024-09-02 21:02:09 +02:00
page.el
paragraphs.el Improve sentence-end-double-space docstring 2024-07-01 02:41:52 +02:00
picture.el
pixel-fill.el Avoid signaling errors from 'pixel-fill-region' 2024-02-03 11:09:36 +02:00
po.el
refbib.el Checkdoc fixes in textmodes/*.el 2024-07-08 17:24:54 +02:00
refer.el Checkdoc fixes in textmodes/*.el 2024-07-08 17:24:54 +02:00
refill.el ; * lisp/textmodes/refill.el (refill-fill-paragraph-at): Fix typo. 2024-01-27 13:28:32 +02:00
reftex-auc.el
reftex-cite.el Support biblatex field in `reftex-cite-format' 2024-05-07 15:50:03 +02:00
reftex-dcr.el ; Fix typos 2024-07-18 11:46:50 +02:00
reftex-global.el Prefer setq-local in reftex 2024-06-23 15:45:59 +02:00
reftex-index.el Merge from savannah/emacs-30 2024-07-09 09:33:09 +08:00
reftex-parse.el Move over optional arguments in parentheses correctly 2024-04-09 14:08:17 +02:00
reftex-ref.el
reftex-sel.el Prefer setq-local in reftex 2024-06-23 15:45:59 +02:00
reftex-toc.el Prefer setq-local in reftex 2024-06-23 15:45:59 +02:00
reftex-vars.el ; Fix compiler warning 2024-02-24 09:30:16 +01:00
reftex.el Prefer setq-local in reftex 2024-06-23 15:45:59 +02:00
remember.el
rst.el Merge from origin/emacs-30 2024-07-27 04:27:53 -04:00
sgml-mode.el ; Fix typos 2024-06-23 16:40:06 +02:00
string-edit.el Prevent deletion of separator in *edit string* buffer 2024-06-15 11:37:34 +03:00
table.el Checkdoc fixes in textmodes/*.el 2024-07-08 17:24:54 +02:00
tex-mode.el Provide a modified xref backend for TeX buffers 2024-09-14 17:05:33 +02:00
texinfmt.el
texinfo.el
texnfo-upd.el
text-mode.el ; Fix :type of text-mode-ispell-word-completion. 2024-02-28 17:04:20 +01:00
tildify.el
toml-ts-mode.el Fix 'forward-comment' in 'toml-ts-mode' 2024-08-17 12:29:31 +03:00
two-column.el
underline.el
word-wrap-mode.el
yaml-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00