>From afac62646f54cd4dc3d26bd2507b11ef02fca3a8 Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 9 Feb 2024 00:06:39 +0900 Subject: [PATCH] Increase description of `TeX-modes' in the document * doc/install.texi (Loading the package): Increase the explanation of the purpose and usage of `TeX-modes' with proper entry of @defopt. Add a paragraph for an alternative method to arrange the redirections. --- doc/install.texi | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/install.texi b/doc/install.texi index 52be62f9..98975060 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -353,11 +353,31 @@ below. @end ifclear Once activated, the modes provided by @AUCTeX{} are used per default for -all supported file types. If you want to change the modes for which it -is operative instead of the default, use +all supported file types, namely @code{plain-tex-mode}, @code{latex-mode}, +@code{doctex-mode} and @code{texinfo-mode}. This might not match your +preference. You can have control over which @AUCTeX{} mode is activated +per file types by @code{TeX-modes} option. For example, you can use Emacs +built-in @code{plain-tex-mode} for plain @TeX{} files while you can use +@AUCTeX{} @code{LaTeX-mode} for @LaTeX{} files. + +@defopt TeX-modes +List of Emacs built-in @TeX{} modes redirected to @AUCTeX{} modes. If you +prefer a particular built-in mode over @AUCTeX{} mode, remove it from this +list. Type @example @kbd{M-x customize-option @key{RET} TeX-modes @key{RET}} @end example +@noindent +to manipulate the contents of @code{TeX-modes}. +@end defopt + +Don't remove @code{tex-mode} from @code{TeX-modes} because it results in +inconsistent behavior. + +On Emacs 29 and later, you can alter @code{major-mode-remap-alist} instead +of @code{TeX-modes} as you like to arrange @AUCTeX{} redirections. In +fact, @code{TeX-modes} option does nothing other than setting up +@code{major-mode-remap-alist} according its value on those Emacsens. If you want to remove a preinstalled @AUCTeX{} completely before any of its modes have been used, @@ -365,7 +385,7 @@ its modes have been used, (unload-feature 'tex-site) @end lisp @noindent -should accomplish that. +in your init file should accomplish that. @node Advice for package providers @section Providing @AUCTeX{} as a package -- 2.43.0