GNU bug report logs - #53199
[PATCH] * Clarify that @var{auto-mode-alist} is searched

Previous Next

Package: emacs;

Reported by: Hong Xu <hong <at> topbug.net>

Date: Wed, 12 Jan 2022 00:47:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53199 in the body.
You can then email your comments to 53199 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53199; Package emacs. (Wed, 12 Jan 2022 00:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hong Xu <hong <at> topbug.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Jan 2022 00:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hong Xu <hong <at> topbug.net>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] * Clarify that @var{auto-mode-alist} is searched
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.
 
 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






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53199; Package emacs. (Wed, 12 Jan 2022 04:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 53199 <at> debbugs.gnu.org (full text, mbox):

From: Hong Xu <hong <at> topbug.net>
To: 53199 <at> debbugs.gnu.org
Subject: Re: bug#53199: Acknowledgement ([PATCH] * Clarify that
 @var{auto-mode-alist} is searched)
Date: Tue, 11 Jan 2022 20:50:09 -0800
The title missed a last word "sequentially"




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 12 Jan 2022 12:40:02 GMT) Full text and rfc822 format available.

Notification sent to Hong Xu <hong <at> topbug.net>:
bug acknowledged by developer. (Wed, 12 Jan 2022 12:40:02 GMT) Full text and rfc822 format available.

Message #13 received at 53199-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Hong Xu <hong <at> topbug.net>
Cc: 53199-done <at> debbugs.gnu.org
Subject: Re: bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is
 searched
Date: Wed, 12 Jan 2022 14:38:46 +0200
> From: Hong Xu <hong <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Feb 2022 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.