From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8158: Definition of auto-mode-alist Date: Thu, 03 Mar 2011 23:22:03 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299213431 6214 80.91.229.12 (4 Mar 2011 04:37:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2011 04:37:11 +0000 (UTC) Cc: 8158@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 04 05:37:04 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PvMlB-0004k3-Oo for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Mar 2011 05:37:01 +0100 Original-Received: from localhost ([127.0.0.1]:40774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvMlB-0000Gp-6Q for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Mar 2011 23:37:01 -0500 Original-Received: from [140.186.70.92] (port=45979 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvMl1-0000Fg-J3 for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2011 23:36:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvMl1-00041M-56 for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2011 23:36:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvMl1-00041I-30 for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2011 23:36:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PvMXd-0006DO-R2; Thu, 03 Mar 2011 23:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Mar 2011 04:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8158 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 8158-submit@debbugs.gnu.org id=B8158.129921253223835 (code B ref 8158); Fri, 04 Mar 2011 04:23:01 +0000 Original-Received: (at 8158) by debbugs.gnu.org; 4 Mar 2011 04:22:12 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvMWq-0006CO-Ji for submit@debbugs.gnu.org; Thu, 03 Mar 2011 23:22:12 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvMWo-0006CA-IM for 8158@debbugs.gnu.org; Thu, 03 Mar 2011 23:22:11 -0500 Original-Received: from [207.96.179.97] (port=46547 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PvMWi-0001Tx-9Y; Thu, 03 Mar 2011 23:22:04 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4BD12660D6; Thu, 3 Mar 2011 23:22:03 -0500 (EST) In-Reply-To: (Reuben Thomas's message of "Wed, 2 Mar 2011 22:02:25 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 03 Mar 2011 23:23:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:44610 Archived-At: > ;; 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). Stefan