emacs/lib-src
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
..
asset-directory-tool.c Prefer static_assert to verify 2024-08-22 00:51:55 +02:00
be_resources.cc ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ChangeLog.1 Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
COPYING Merge from Gnulib 2017-10-01 18:31:10 -07:00
ctags.c
ebrowse.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
emacsclient.c Support --no-window-system option in emacsclient 2024-06-12 14:10:32 +03:00
etags.c Provide a modified xref backend for TeX buffers 2024-09-14 17:05:33 +02:00
hexl.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
make-docfile.c Pacify gcc -Wmissing-variable-declarations 2024-05-11 18:46:27 -07:00
make-fingerprint.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Makefile.in Port to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e 2024-02-08 23:22:00 -08:00
movemail.c ; Eliminate more C++ comments 2024-08-17 22:04:01 +08:00
ntlib.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ntlib.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
pop.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
pop.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rcs2log rcs2log now groks add-log-time-zone rule 2024-04-12 13:14:29 -07:00
README
seccomp-filter.c Be more systematic about parens in C source code 2024-01-20 17:28:53 -08:00
update-game-score.c Port better to NFS unlink 2024-08-15 20:11:33 -07:00

This directory contains the source code for the architecture-dependent
files that go in ${archlibdir}.  At present, these are mostly utility
programs used by GNU Emacs.