unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched
@ 2022-01-12  0:46 Hong Xu
       [not found] ` <handler.53199.B.164194839726056.ack@debbugs.gnu.org>
  2022-01-12 12:38 ` bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: Hong Xu @ 2022-01-12  0:46 UTC (permalink / raw)
  To: 53199

 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







^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#53199: Acknowledgement ([PATCH] * Clarify that @var{auto-mode-alist} is searched)
       [not found] ` <handler.53199.B.164194839726056.ack@debbugs.gnu.org>
@ 2022-01-12  4:50   ` Hong Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Hong Xu @ 2022-01-12  4:50 UTC (permalink / raw)
  To: 53199

The title missed a last word "sequentially"





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched
  2022-01-12  0:46 bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched Hong Xu
       [not found] ` <handler.53199.B.164194839726056.ack@debbugs.gnu.org>
@ 2022-01-12 12:38 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2022-01-12 12:38 UTC (permalink / raw)
  To: Hong Xu; +Cc: 53199-done

> From: Hong Xu <hong@topbug.net>
> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-12 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  0:46 bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched Hong Xu
     [not found] ` <handler.53199.B.164194839726056.ack@debbugs.gnu.org>
2022-01-12  4:50   ` bug#53199: Acknowledgement ([PATCH] * Clarify that @var{auto-mode-alist} is searched) Hong Xu
2022-01-12 12:38 ` bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).