Subject: bug#53199: closed (Re: bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 12 Jan 2022 12:40:02 +0000

Your bug report

#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
53199: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53199
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched
From: Eli Zaretskii <[email-masked]>
To: Hong Xu <[email-masked]>
Cc: [email-masked]
Date: Wed, 12 Jan 2022 14:38:46 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Hong Xu <[email-masked]>
> Date: Tue, 11 Jan 2022 16:46:22 -0800
> 
>  doc/lispref/modes.texi | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
> index 5fc831536e82..0bd1fc51febf 100644
> --- a/doc/lispref/modes.texi
> +++ b/doc/lispref/modes.texi
> @@ -750,9 +750,10 @@ Auto Major Mode
>  When you visit a file whose expanded file name (@pxref{File Name
>  Expansion}), with version numbers and backup suffixes removed using
>  @code{file-name-sans-versions} (@pxref{File Name Components}), matches
> -a @var{regexp}, @code{set-auto-mode} calls the corresponding
> -@var{mode-function}.  This feature enables Emacs to select the proper
> -major mode for most files.
> +a @var{regexp}, @code{set-auto-mode} calls the @var{mode-function}
> +that corresponds to the first such @var{regexp} in
> +@var{auto-mode-alist}.  This feature enables Emacs to select the
> +proper major mode for most files.

Thanks.  I decided to clarify this in a slightly different way, by
adding the following sentence after the description of the matching
process:

  If @code{auto-mode-alist} has more than one element whose @var{regexp}
  matches the file name, Emacs will use the first match.

With that, I'm closing the bug.

Subject: [PATCH] * Clarify that @var{auto-mode-alist} is searched
From: Hong Xu <[email-masked]>
To: bug-gnu-emacs <[email-masked]>
Date: Tue, 11 Jan 2022 16:46:22 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

 doc/lispref/modes.texi | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 5fc831536e82..0bd1fc51febf 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -750,9 +750,10 @@ Auto Major Mode
 When you visit a file whose expanded file name (@pxref{File Name
 Expansion}), with version numbers and backup suffixes removed using
 @code{file-name-sans-versions} (@pxref{File Name Components}), matches
-a @var{regexp}, @code{set-auto-mode} calls the corresponding
-@var{mode-function}.  This feature enables Emacs to select the proper
-major mode for most files.
+a @var{regexp}, @code{set-auto-mode} calls the @var{mode-function}
+that corresponds to the first such @var{regexp} in
+@var{auto-mode-alist}.  This feature enables Emacs to select the
+proper major mode for most files.
 
 If an element of @code{auto-mode-alist} has the form @code{(@var{regexp}
 @var{function} t)}, then after calling @var{function}, Emacs searches
-- 
2.30.2