unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: 9110-done@debbugs.gnu.org
Subject: bug#9110: how to map sh-mode to mean bash-mode
Date: Sun, 17 Jul 2011 19:02:26 -0400	[thread overview]
Message-ID: <5e1uxoa4u5.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <871uxovdtu.fsf@jidanni.org> (jidanni@jidanni.org's message of "Mon, 18 Jul 2011 04:42:37 +0800")

jidanni@jidanni.org wrote:

> As you know, the bash shell likes to call itself sh sometimes.
> But it is really still bash.

No, it isn't.

> Hence I would like to make my emacs assume anything it thinks is sh is
> really bash, and thus show me "bash" in the mode line, not "sh", no
> matter how smart it thinks it is.

(add-hook 'sh-mode-hook
          '(lambda () (and buffer-file-name
                           (string-match "\\.sh\\'" buffer-file-name)
                           (sh-set-shell "bash"))))





  reply	other threads:[~2011-07-17 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E232057.1040409@easy-emacs.de>
2011-07-17 20:42 ` bug#9110: how to map sh-mode to mean bash-mode jidanni
2011-07-17 23:02   ` Glenn Morris [this message]
2011-07-17 23:53   ` bug#9110: closed (Re: bug#9110: how to map sh-mode to mean bash-mode) jidanni
2011-07-18 15:42     ` Stefan Monnier
2011-07-18  4:51   ` bug#9110: how to map sh-mode to mean bash-mode jidanni
2011-07-18  5:52   ` Andreas Röhler
2011-07-19 23:25   ` bug#9110: " jidanni

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=5e1uxoa4u5.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=9110-done@debbugs.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.
Code repositories for project(s) associated with this public inbox

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

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).