From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#8158: Definition of auto-mode-alist Date: Thu, 21 Oct 2021 13:29:08 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19750"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 8158@debbugs.gnu.org, Reuben Thomas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 21 22:31:48 2021 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 1mdej6-0004xH-Fw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 22:31:48 +0200 Original-Received: from localhost ([::1]:54764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdej5-0007iG-4P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 16:31:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdehQ-0006hR-Sf for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 16:30:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdehQ-0005hn-I4 for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 16:30:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdehQ-0000Ko-EN for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 16:30:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2021 20:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8158 X-GNU-PR-Package: emacs Original-Received: via spool by 8158-submit@debbugs.gnu.org id=B8158.16348481561113 (code B ref 8158); Thu, 21 Oct 2021 20:30:04 +0000 Original-Received: (at 8158) by debbugs.gnu.org; 21 Oct 2021 20:29:16 +0000 Original-Received: from localhost ([127.0.0.1]:58709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdege-0000Ht-80 for submit@debbugs.gnu.org; Thu, 21 Oct 2021 16:29:16 -0400 Original-Received: from mail-pl1-f177.google.com ([209.85.214.177]:40801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdegc-0000HR-Jw for 8158@debbugs.gnu.org; Thu, 21 Oct 2021 16:29:15 -0400 Original-Received: by mail-pl1-f177.google.com with SMTP id v20so1219076plo.7 for <8158@debbugs.gnu.org>; Thu, 21 Oct 2021 13:29:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=97/ZDngHx5GVFL07uLl/q7mdNMYeHKAHtkIIQpkHu/8=; b=NIPdEUDbv0jQmAWgt2JYuP4RaYNW9xrXs8vAXq9ktweLz80cPxR8FykweMOhtW55Q4 b/zXaFTFG7D+u7oG4XX4bJ1OdtRfywUGxOUaCbHXCf0yOmC4qN4UQ6llpr/QZ4GC6EAe mMSQnZUpyuPxbYowewajTHOIo0tsS3InUX/YoTBXolLhnqmNEG3u7DIrrpwtTkIrBckj 5zxcmAdXJ60jqZCpeqQ8/3Q41CqJPVOfsdLBbc5xpD+ywi710D9OM237NRB+Z+9y3dcd 9orQUpKNbdMwMjRFpPBklnyHIkOILH5oPdBy07Pg8rOHI8gJpFTE6wyIO9boHRyDg7Y6 4ZYQ== X-Gm-Message-State: AOAM530VDDemJSRwAYXkU7Vtgu4jxekeQX+kxae/5oovug6dUemfPneD 3Ng85wqdALzbV8cnR9P9LLKM2w8k4fzMLeQl77I= X-Google-Smtp-Source: ABdhPJxlWgCXHSEk/OCwQc8LUFlrRG2+tFQ8sc8eDZxlUpX1/Vg4arsi88T4ZgAOFMgDD/xh3q51jnAQyg/DzJmsC5A= X-Received: by 2002:a17:902:b691:b029:12d:2b6:d116 with SMTP id c17-20020a170902b691b029012d02b6d116mr7076086pls.71.1634848149080; Thu, 21 Oct 2021 13:29:09 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 21 Oct 2021 13:29:08 -0700 In-Reply-To: (Stefan Monnier's message of "Thu, 03 Mar 2011 23:22:03 -0500") 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:217815 Archived-At: Stefan Monnier writes: >> ;; Note: The entries for the modes defined in cc-mode.el (c-mode, >> ;; c++-mode, java-mode and more) are added through autoload >> ;; directives in that file. That way is discouraged since it >> ;; spreads out the definition of the initial value. > >> Isn't this a bit unmodular as Emacs continues to grow, and given loaddefs.el? > > I agree, but I think Richard disagrees. Also, order of entries in > auto-mode-alist can be important, so autoloading those entries does not > work for all cases. But for 90% of the cases, it's perfectly fine and > indeed we do use it already in several cases. > > Such ordering conflicts are difficult to detect automatically: detecting > them when we compile Emacs requires checking which regexps overlap > (which is perfectly doable in theory, but we'd need a "regexp-to-DFA > compiler" for that, basically), detecting them at run-time is too late > (often it'd be wrong to ask the user to resolve such conflicts). Does anyone object to just removing the above comment? And similarly for `interpreter-mode-alist', I suppose.