This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 10798 - Emacs shell-script mode doesn't know about bash2
Emacs shell-script mode doesn't know about bash2
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: emacs (Show other bugs)
6.2
All Linux
medium Severity low
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2000-04-18 12:55:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
is

#!/bin/bash2

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)
                                   interpreter-mode-alist))
(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.