all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Will Parsons <oudeis@nodomain.invalid>
Subject: Re: Forcing a mode
Date: 31 Aug 2006 21:11:13 GMT	[thread overview]
Message-ID: <slrnefek3h.onm.oudeis@isis.thalatta> (raw)
In-Reply-To: ufyfd7wo1.fsf@newcastle.ac.uk

Phillip Lord wrote:
>>>>>> "AB" == Aaron Bingham <bingham@cenix-bioscience.com> 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

  reply	other threads:[~2006-08-31 21:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 13:40 Forcing a mode CloudStrife
2006-08-31 15:09 ` Aaron Bingham
2006-08-31 21:33 ` Colin S. Miller
     [not found] ` <mailman.6088.1157036963.9609.help-gnu-emacs@gnu.org>
2006-08-31 15:27   ` Phillip Lord
2006-08-31 21:11     ` Will Parsons [this message]
2006-09-01  0:58       ` Barry Margolin
2006-09-01 13:43       ` rgb
2006-09-01  5:39   ` CloudStrife

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnefek3h.onm.oudeis@isis.thalatta \
    --to=oudeis@nodomain.invalid \
    --cc=ellenophilos@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.