emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#9110: closed (how to map sh-mode to mean bash-mo


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#9110: closed (how to map sh-mode to mean bash-mode)
Date: Sun, 17 Jul 2011 23:03:01 +0000

Your message dated Sun, 17 Jul 2011 19:02:26 -0400
with message-id <address@hidden>
and subject line Re: bug#9110: how to map sh-mode to mean bash-mode
has caused the GNU bug report #9110,
regarding how to map sh-mode to mean bash-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9110: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9110
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Re: how to map sh-mode to mean bash-mode Date: Mon, 18 Jul 2011 04:42:37 +0800
Dear bug-gnu-emacs,
There is no way to map sh-mode to bash-mode.
As you know, the bash shell likes to call itself sh sometimes.
But it is really still bash.
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. See also
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-07/msg00143.html
However the real solution should be a one liner of lisp in ones .emacs.



--- End Message ---
--- Begin Message --- Subject: Re: bug#9110: how to map sh-mode to mean bash-mode Date: Sun, 17 Jul 2011 19:02:26 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
address@hidden 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"))))


--- End Message ---

reply via email to

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