File-local-variable support for sh-script; add mksh support
commite619d93c227597bccc8b3d76ee8518fb20098bb1
authorDaniel Colascione <dancol@dancol.org>
Wed, 21 May 2014 01:55:54 +0000 (20 18:55 -0700)
committerDaniel Colascione <dancol@dancol.org>
Wed, 21 May 2014 01:55:54 +0000 (20 18:55 -0700)
treec0749f1051f1096ea8b27ffe99c7a3c185725c7e
parent8ea51e4f0819f249424cbbbec12bf4c6d750513a
parent708374c7bc07fd778126e43daea2651ca66a893c
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.
lisp/ChangeLog