Received: (at quiet) by debbugs.gnu.org; 26 Jan 2012 07:01:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 26 02:01:00 2012 Received: from localhost ([127.0.0.1]:44883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1RqJKJ-0007Wv-G6 for submit <at> debbugs.gnu.org; Thu, 26 Jan 2012 02:00:59 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:33317 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1RqJKG-0007Wn-T2 for quiet <at> debbugs.gnu.org; Thu, 26 Jan 2012 02:00:53 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1RqJJl-0002fD-Lw; Thu, 26 Jan 2012 02:00:21 -0500 From: Glenn Morris <rgm@HIDDEN> To: quiet <at> debbugs.gnu.org Subject: inhibit-local-variables-regexps, auto-coding-alist, auto-mode-alist X-Spook: Armani FIPS140 ASPIC Kosovo e-cash illuminati Hamas X-Ran: \ap%@q#"VTP'N7f#msFzGe`l=Tew$*9-pfy|NjJFyTVr[D*zR2Dmq"2%Cj'T\VJa4I$Jp4 X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 26 Jan 2012 02:00:21 -0500 Message-ID: <0owr8fkkxm.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: quiet X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -4.2 (----) Package: emacs Severity: minor From bug#10506: There is some duplication between inhibit-local-variables-regexps and auto-coding-alist. Many of the elements are common to each. Also, they both duplicate some elements of auto-mode-alist. What i-l-v-r really wants is a list of modes, not extensions. Eg "tar mode". Then the extensions could be looked up in auto-mode-alist. Stefan's suggestion: I think the way to reduce such redundancy (without removing the possibility to handle things differently) is to add indirections: e.g. allow not just regexps but also major-mode symbols (so auto-mode-alist maps the file name to a major mode and than this mode can be consulted in inhibit-file-variables-regexps and auto-coding-alist, and we (w|c)ould ideally take major-mode inheritance into account so we could make tar-mode and image-mode inherit from a binary-mode parent and only have binary-mode listed in those two lists).
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.