Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 10798 - Emacs shell-script mode doesn't know about bash2
Emacs shell-script mode doesn't know about bash2
Product: Red Hat Linux
Classification: Retired
Component: emacs (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Cristian Gafton
Depends On:
  Show dependency treegraph
Reported: 2000-04-13 13:52 EDT by Richard Cobbe
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-04-18 12:55:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard Cobbe 2000-04-13 13:52:55 EDT
As shipped, emacs's shell-script mode and supporting utilities don't know
anything about bash2.  As a result, when one opens a file whose first line


it comes up in text mode, rather than shell-script mode.  Easily fixed with
a M-x shell-script-mode, but still annoying.

To fix, run the following when emacs is initialized:

(require 'sh-script)
(setq interpreter-mode-alist (cons '("bash2" . sh-mode)
(setq sh-ancestor-alist (cons '(bash2 . jsh) sh-ancestor-alist))
(setq sh-alias-alist (cons '(bash2 . bash) sh-alias-alist))

I'm not really sure where to put this: /etc/skel/.emacs will only work for
new users, and I don't know that I like putting that (require 'sh-script)
in site-init.el before a build---why load packages when you're not sure
you're going to need them?  Perhaps someone who is more skilled with
emacs-lisp than I am can find a better solution.
Comment 1 Trond Eivind Glomsrxd 2000-04-18 12:55:59 EDT
I've patched it into emacs 20.6, it should be available in next rawhide (20.6-3
or higher)

Note You need to log in before you can comment on or make changes to this bug.