Make sh-mode use `auto-mode-interpreter-regexp'
* lisp/progmodes/sh-script.el (sh-mode): Use `auto-mode-interpreter-regexp' instead of open-coding the value (bug#17158).
This commit is contained in:
parent
5536893c6e
commit
5aff1bfdaf
1 changed files with 1 additions and 1 deletions
|
@ -1556,7 +1556,7 @@ with your script for an edit-interpret-debug cycle."
|
|||
(sh-set-shell
|
||||
(cond ((save-excursion
|
||||
(goto-char (point-min))
|
||||
(looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)"))
|
||||
(looking-at auto-mode-interpreter-regexp))
|
||||
(match-string 2))
|
||||
((not buffer-file-name) sh-shell-file)
|
||||
;; Checks that use `buffer-file-name' follow.
|
||||
|
|
Loading…
Add table
Reference in a new issue