unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Eric B." <ebenze@hotmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Is there an emacs bash script mode / colouring?
Date: Thu, 17 Sep 2009 14:41:20 -0400	[thread overview]
Message-ID: <71fa2$4ab2876f$4c0ab2c1$16688@TEKSAVVY.COM> (raw)
In-Reply-To: 4ab1111e$0$285$14726298@news.sunsite.dk

"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> wrote in message 
news:4ab1111e$0$285$14726298@news.sunsite.dk...
> Eric B. wrote:
>> "Anselm Helbig" <anselm.helbig+news2009@googlemail.com> wrote in message 
>> news:87ab0wc9ac.wl%anselm.helbig+news2009@googlemail.com...
>>> Hi!
>>>
>>>> This may sound like a silly question, but is there a major/minor mode 
>>>> for
>>>> emacs that does syntax colouring and auto-formatting of bash scripts?
>>>>
>>>> I've tried searching the web, but can't seem to find anything 
>>>> applicable.
>>> Well, silly it is. 8-) Bash is supported by sh-mode, which should
>>> already be active when you're using the .sh extension for your
>>> file. If you don't use an extension, it will be activated after a
>>> revert-buffer.
>>
>> Well, yes - sh mode is activated upon opening of any .sh file.  However, 
>> for some reason, I find it doesn't do any formatting and/or syntax 
>> colouring. My nxml mode does both, so I know it isn't my terminal that is 
>> problematic. Is there something in the config that I am missing for 
>> sh-mode?
>>
>> I'm running emacs 21.4.1
>>
>> Thanks,
>>
>> Eric
>>
>>
> Eric,
>
> Does
> M-x font-lock-mode
> or
> M-x font-lock-fontify-buffer
> help?

Aha - both seem to work like a charm.  Thanks for the tip.

>
> Is the mode-line "(Shell-script [bash])" or "(Shell-script Font[bash]") ?

My mode-line is Shell-script[bash].  How do I change that to Font[bash]?

Thanks,

Eric




  reply	other threads:[~2009-09-17 18:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 18:57 Is there an emacs bash script mode / colouring? Eric B.
2009-09-15 19:06 ` Bruno Barbier
2009-09-15 19:11 ` Anselm Helbig
2009-09-16 15:53   ` Eric B.
2009-09-16 16:23     ` Colin S. Miller
2009-09-17 18:41       ` Eric B. [this message]
2009-09-18 16:19         ` Colin S. Miller
2009-09-18 20:12           ` despen
2009-09-16 17:28     ` Peter Dyballa
2009-10-12  3:32   ` David Combs
2009-10-12 11:53     ` Richard Riley

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='71fa2$4ab2876f$4c0ab2c1$16688@TEKSAVVY.COM' \
    --to=ebenze@hotmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).