emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 bd5ef3ef95: Improve the documentation of 'auto-mode-alist' sear


From: Eli Zaretskii
Subject: emacs-29 bd5ef3ef95: Improve the documentation of 'auto-mode-alist' search
Date: Wed, 18 Jan 2023 09:01:49 -0500 (EST)

branch: emacs-29
commit bd5ef3ef95e989fa7c2c4e9f24851d7e165abbdf
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Improve the documentation of 'auto-mode-alist' search
    
    * doc/emacs/modes.texi (Choosing Modes): Expand the description of
    "recursive extension stripping" using 'auto-mode-alist'.
    (Bug#60930)
---
 doc/emacs/modes.texi | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index d0eacce084..06f9929092 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -430,10 +430,15 @@ For example, one element normally found in the list has 
the form
 mode for files whose names end in @file{.c}.  (Note that @samp{\\} is
 needed in Lisp syntax to include a @samp{\} in the string, which must
 be used to suppress the special meaning of @samp{.} in regexps.)  If
-the element has the form @code{(@var{regexp} @var{mode-function}
-@var{flag})} and @var{flag} is non-@code{nil}, then after calling
-@var{mode-function}, Emacs discards the suffix that matched
-@var{regexp} and searches the list again for another match.
+the element has the form @w{@code{(@var{regexp} @var{mode-function}
+@var{flag})}} and @var{flag} is non-@code{nil}, then after calling
+@var{mode-function} (if it is non-@code{nil}), Emacs discards the
+suffix that matched @var{regexp} and searches the list again for
+another match.  This ``recursive extension stripping'' is used for
+files which have multiple extensions, and the ``outer'' extension
+hides the ``inner'' one that actually specifies the right mode.  For
+example, backup files and GPG-encrypted files with @file{.gpg}
+extension use this feature.
 
 @vindex auto-mode-case-fold
   On GNU/Linux and other systems with case-sensitive file names, Emacs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]