• Daniel Colascione's avatar
    File-local-variable support for sh-script; add mksh support · 708374c7
    Daniel Colascione authored
    * 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
    708374c7
files.el 284 KB