[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to open a file in sh-mode

From: Henrik Austad
Subject: Re: How to open a file in sh-mode
Date: Thu, 14 Aug 2008 13:36:54 +0200
User-agent: KMail/1.9.9

On Thursday 14 August 2008 12:06:59 Francis Moreau wrote:
> On Thu, Aug 14, 2008 at 12:03 PM, Henrik Austad <address@hidden> 
> > so basically, I think the question boils down to:
> >
> > """
> > How do I create a hook in my .emacs so that all files starting with
> > bash-fc-* will load sh-mode?
> > """
> Well that would be the last thing I would do.
> My question is:
> """
> How do I start emacs in sh-mode from the shell with a file name
> appended at the end of the command
> """
> It doesn't seem to be all that complex !

ok, I think I got something that works, thanks to all the guys at #emacs for 
this (ams, pgas, bpalmer)

In .emacs add the following:
(add-to-list 'auto-mode-alist '("bash-fc" . sh-mode))

export FCEDIT="emacs"

then sh-mode will be loaded when you open files starting with bash-fc

as a test;
echo "Hello World" && fc 

mvh Henrik Austad

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]