From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: mode setting question Date: Tue, 14 Jul 2009 22:50:19 +0200 Message-ID: References: <1247603229.5941.25.camel@dell-desktop.example.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1247605849 3181 80.91.229.12 (14 Jul 2009 21:10:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2009 21:10:49 +0000 (UTC) Cc: emacs-devel To: Thomas Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 14 23:10:42 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQpGs-00013N-3R for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2009 23:10:42 +0200 Original-Received: from localhost ([127.0.0.1]:51223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQpGr-0001Rv-7f for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2009 17:10:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQoxG-0001Sn-Kl for emacs-devel@gnu.org; Tue, 14 Jul 2009 16:50:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQoxC-0001QR-Ua for emacs-devel@gnu.org; Tue, 14 Jul 2009 16:50:26 -0400 Original-Received: from [199.232.76.173] (port=41714 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQoxC-0001QK-Q1 for emacs-devel@gnu.org; Tue, 14 Jul 2009 16:50:22 -0400 Original-Received: from mail-bw0-f219.google.com ([209.85.218.219]:48671) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQoxC-000313-96 for emacs-devel@gnu.org; Tue, 14 Jul 2009 16:50:22 -0400 Original-Received: by bwz19 with SMTP id 19so1407420bwz.42 for ; Tue, 14 Jul 2009 13:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eHo6a8PkWEmVTgWSLBz2fOA2fGeLKn6bi/UGCxEhQ7E=; b=TQ719fVCXG/DqZhrCCnEtS5s9CzBqH1g8mRGwbPTVY8gXtvFvpoh2CKwMBVRpU1Mt8 u8kOABP6bMuT9EBWPQJGK30TC6lcLyiwQYD2z+pefUn72ESDBw+fe7r84dIM6KFS+w2u LFS+5CQ04eop1kebeeoZvrbarWCOMNZ/f2YKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=iAn+mjWq4f4+uuuw2LIiiau8nH/Twnyc2jQrDmujwE3kftnnRxTkmVsEVxCA0T6t42 X5wK7jFAPiDa11+tpEeQkWORnJyaJMjdkdcR2ESnJ3OC6FaNgQ1n+XXuA3pM/m1NgXn6 X7SgzePacBbNh30nISqo3XLxllQhLuloGnMe4= Original-Received: by 10.223.104.74 with SMTP id n10mr3335387fao.5.1247604619833; Tue, 14 Jul 2009 13:50:19 -0700 (PDT) In-Reply-To: <1247603229.5941.25.camel@dell-desktop.example.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112472 Archived-At: On Tue, Jul 14, 2009 at 10:27 PM, Thomas Lord wrote: > > I would like to set the mode AS IF the visited > file name were "hw.c", without that actually being > the visited file name. =C2=A0That is, if the contents > include automode foo within the buffer, use that. > If not, consult the auto-mode-alist using hw.c > and use that. > > What is the clean way to do so? Ask here ;-) This is a thing I have asked for several times. The code in normal-mode should be broken up so that it is possible to ask "what mode is the normal modes for files named nn.ext".