1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/lisp/textmodes
Stefan Monnier 2b5d43081a (major-mode-remap(-defaults)): New var and function (bug#69191)
While `major-mode-remap-alist` provides a way for users to indicate the
major mode of their choice, we need a similar variable for the
use of packages.

This patch adds a new `major-mode-remap-defaults` and changes various
packages to obey it or make use of it.
I think it nicely cleans the regexp duplication between CC-mode and
`c-ts-mode.el` and also makes it easier/cleaner for users to override
the changes made by `*-ts-mode.el`.

* lisp/files.el (major-mode-remap-defaults): New variable.
(major-mode-remap): New function.
(set-auto-mode-0): Use it.
* doc/lispref/modes.texi (Auto Major Mode): Document them.

* lisp/textmodes/tex-mode.el (tex--redirect-to-submode):
Use `major-mode-remap`.
(major-mode-remap-defaults): Set it to remap AUCTeX modes by default.
* lisp/progmodes/ruby-ts-mode.el (auto-mode-alist): Leave it alone.
(major-mode-remap-defaults): Set this one instead.
* lisp/progmodes/c-ts-mode.el (c-or-c++-ts-mode): Use `major-mode-remap`.
(auto-mode-alist): Leave it alone.
(major-mode-remap-defaults): Set this one instead.
* lisp/org/ox.el (org-export-to-buffer): Modernize docstring accordingly.
* lisp/progmodes/cc-mode.el (c-or-c++-mode):
* lisp/org/ox-latex.el (org-latex-export-as-latex):
* lisp/org/ox-koma-letter.el (org-koma-letter-export-as-latex):
* lisp/org/ox-beamer.el (org-beamer-export-as-latex):
Use `major-mode-remap` when available.
2024-03-03 23:58:18 -05:00
..
artist.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
bib-mode.el
bibtex-style.el
bibtex.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
conf-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
css-mode.el
dns-mode.el
emacs-authors-mode.el
emacs-news-mode.el
enriched.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
fill.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flyspell.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
glyphless-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
html-ts-mode.el Tree-sitter support for outline-minor-mode (bug#68824) 2024-02-12 20:18:24 +02:00
ispell.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
less-css-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
makeinfo.el
mhtml-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
nroff-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
page-ext.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
page.el ; * lisp/textmodes/page.el (page--what-page): Fix last change. 2024-01-13 12:45:10 +02:00
paragraphs.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
picture.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
pixel-fill.el Avoid signaling errors from 'pixel-fill-region' 2024-02-03 11:09:36 +02:00
po.el
refbib.el
refer.el
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 Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
reftex-dcr.el
reftex-global.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
reftex-index.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
reftex-parse.el
reftex-ref.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
reftex-sel.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
reftex-toc.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
reftex-vars.el ; Fix compiler warning 2024-02-24 09:30:16 +01:00
reftex.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
remember.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
rst.el ; Resolve a FIXME in rst.el 2024-02-13 14:08:37 +02:00
sgml-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
string-edit.el
table.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
tex-mode.el (major-mode-remap(-defaults)): New var and function (bug#69191) 2024-03-03 23:58:18 -05: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 Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
toml-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
two-column.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
underline.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
word-wrap-mode.el
yaml-ts-mode.el Fix 'fill-paragraph' in 'yaml-ts-mode' 2024-02-01 12:29:53 +02:00