File-local-variable support for sh-script; add mksh support
authorDaniel Colascione <dancol@dancol.org>
Wed, 21 May 2014 01:54:33 +0000 (18:54 -0700)
committerDaniel Colascione <dancol@dancol.org>
Wed, 21 May 2014 01:54:33 +0000 (18:54 -0700)
commit708374c7bc07fd778126e43daea2651ca66a893c
treeeb1506d41a0c22cd47ffe1cee2e2b7c311ee7375
parenta05affb23880007ad0b00acb7e9a37c2988703d0
File-local-variable support for sh-script; add mksh support

* lisp/files.el (interpreter-mode-alist): Add mksh.

* lisp/progmodes/sh-script.el (sh-ancestor-alist): Add mksh, a pdksh
derivative.
(sh-alias-alist): Alias /system/bin/sh (Android's system shell) to
mksh. Improve custom spec; allow regular expressions.
(sh-shell): Delegate name splitting to `sh-canonicalize-shell'.
(sh-after-hack-local-variables): New function.
(sh-mode): Use it; respect file-local `sh-shell' variable.
(sh-set-shell): Use `sh-canonicalize-shell' instead of open-coding
the normalization.
(sh-canonicalize-shell): Rewrite to support regexes.

Fixes: debbugs:17333
lisp/ChangeLog
lisp/files.el
lisp/progmodes/sh-script.el