From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Parsons Newsgroups: gmane.emacs.help Subject: Re: Forcing a mode Date: 31 Aug 2006 21:11:13 GMT Message-ID: References: <1157031630.512450.23530@h48g2000cwc.googlegroups.com> Reply-To: ellenophilos@yahoo.com NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1157060466 2650 80.91.229.2 (31 Aug 2006 21:41:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2006 21:41:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 31 23:41:02 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIuHS-0003FO-8U for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2006 23:40:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIuHR-0003zL-Pc for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2006 17:40:57 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-X-Trace: individual.net apCVQVDQXOpxvrhFcFSKpwsDiaqSWWct9MRg7K7sQDVVKwP1Ov User-Agent: slrn/0.9.8.1 (Debian) Original-Xref: shelby.stanford.edu gnu.emacs.help:141469 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37090 Archived-At: Phillip Lord wrote: >>>>>> "AB" == Aaron Bingham writes: > > AB> CloudStrife wrote: > > >> I have some tcl files that donot have .tcl extension in file > >> name. So when i open them in emacs the tcl mode is not turned > >> on. can i enforce this onto the file. > >> [snip] > I think he wants this to happen automatically. > > You can do this with file variables. Sticking > > > ;; -*- mode: tcl -*- > > as the first line of the file should work. I've always used: #-*-tcl-*- Is there any reason the longer form with "mode: " should be preferred? > Or > > ;; Local Variables: *** > ;; mode: tcl *** > > at the end should work. You can replace ";;" with what ever tcl uses > as a comment. I didn't know about that one. (Note that Tcl scripts typically begin something like: #!/bin/sh # .... # \ exec tclsh "$0" ${1+"$@"} so Emacs cannot deduce the mode from the shebang.) - Will