From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gustavo Seabra Newsgroups: gmane.emacs.help Subject: Re: select 'mode' from command line? Date: Thu, 30 Jun 2005 15:38:59 +0000 (UTC) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1120146799 31705 80.91.229.2 (30 Jun 2005 15:53:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2005 15:53:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 30 17:53:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Do1LK-0003qH-VK for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jun 2005 17:52:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Do1Tb-0006T1-Vt for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jun 2005 12:01:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Do1O7-0002fy-Nf for help-gnu-emacs@gnu.org; Thu, 30 Jun 2005 11:55:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Do1O5-0002eO-8w for help-gnu-emacs@gnu.org; Thu, 30 Jun 2005 11:55:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Do1O4-0002cg-0m for help-gnu-emacs@gnu.org; Thu, 30 Jun 2005 11:55:36 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Do1LJ-0007vK-9Y for help-gnu-emacs@gnu.org; Thu, 30 Jun 2005 11:52:45 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Do18r-0001pe-4Z for help-gnu-emacs@gnu.org; Thu, 30 Jun 2005 17:39:53 +0200 Original-Received: from green6.qtp.ufl.edu ([128.227.192.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jun 2005 17:39:53 +0200 Original-Received: from gustavo.seabra by green6.qtp.ufl.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jun 2005 17:39:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 34 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 128.227.192.198 (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)) 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:27740 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27740 Jochen Küpper writes: > > Gustavo Seabra writes: > > > I'm working witha code that has both fortran 77 and fortran 90 parts. All the > > files, however, are named *.f, and emacs always opens them with the 'fortran > > mode', which is actually more fortran77. So, I wonder if there's a way to tell > > emacs to use a specific 'mode' from the command line, overriding the default > > definition. > > Can you put Local Variable "cookies" into these files? > > ,----[ (info "(emacs)File Variables") ] > | A file can specify local variable values for use when you edit the file > | with Emacs. Visiting the file checks for local variable > | specifications; it automatically makes these variables local to the > | buffer, and sets them to the values specified in the file. > `---- > > Greetings, > Jochen Thanks. In fact I'm working on someone else's code, so I try to minimize any changes that are not *directly* related to what I'm doing. In this sense, Peter's suggestion worked fine, since it is only one line at the top of the file.