From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53199: [PATCH] * Clarify that @var{auto-mode-alist} is searched Date: Wed, 12 Jan 2022 14:38:46 +0200 Message-ID: <834k696sdl.fsf@gnu.org> References: <54b3ee39-9f6c-5827-807f-227ecd302e4f@topbug.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3835"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53199-done@debbugs.gnu.org To: Hong Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 12 14:59:51 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7eAI-0000rP-Lw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jan 2022 14:59:50 +0100 Original-Received: from localhost ([::1]:43724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7eAH-0002tG-Jd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jan 2022 08:59:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7cwH-0001Kv-JV for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 07:41:17 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7cv5-0006FY-0g for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 07:40:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7cv4-0004vU-TF for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 07:40:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2022 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 53199 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 53199@debbugs.gnu.org, eliz@gnu.org, hong@topbug.net Original-Received: via spool by 53199-done@debbugs.gnu.org id=D53199.164199114418840 (code D ref 53199); Wed, 12 Jan 2022 12:40:02 +0000 Original-Received: (at 53199-done) by debbugs.gnu.org; 12 Jan 2022 12:39:04 +0000 Original-Received: from localhost ([127.0.0.1]:56422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7cu8-0004to-3P for submit@debbugs.gnu.org; Wed, 12 Jan 2022 07:39:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7cu3-0004tB-QY for 53199-done@debbugs.gnu.org; Wed, 12 Jan 2022 07:39:03 -0500 Original-Received: from [2001:470:142:3::e] (port=44024 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7cty-000688-9S; Wed, 12 Jan 2022 07:38:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=szbkI6OWjyTvln6IY8fuRsz7m057BPeUi8SDngoPsE8=; b=RZv+nVcXcySE duoJ7BHYHLVe/DYPNruL0WADUG8yoZNW9PQovF6XC/xHW8fDruxvUwe7zI1WMxJ8lvzzwtCUNyDuj 2Phy9BP8pg5qSRgsCda1ADfvtZtZJkxrnZmxZwxZMJ5UUgbEUBDdyVlHRzvd/5APLea0qwOM0/Gdt 1Z/3q2RLPvThWZCP7Jn/VcHVXOd081RXLtWQHD/HiykcXI6fp5yg3OP/hKWFehaD2glW9Ib3WoLOn MAYu4UGBVfi2Ui2DGcCqy7Fv44lwqiz4o1rIGUykjB1EOPYXMOIj3DsZK09Hrj6CAeTMfKQKq41y2 60GR8/alZDwZbARWzDZxsA==; Original-Received: from [87.69.77.57] (port=4801 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7ctu-0005AT-OI; Wed, 12 Jan 2022 07:38:52 -0500 In-Reply-To: <54b3ee39-9f6c-5827-807f-227ecd302e4f@topbug.net> (message from Hong Xu on Tue, 11 Jan 2022 16:46:22 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223993 Archived-At: > From: Hong Xu > 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.