aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-01-20 03:25:46 +0100
committerLars Ingebrigtsen2021-01-20 03:25:46 +0100
commit5aff1bfdaf6fb64b50087c93f212faa18fbe17fb (patch)
tree86c1b5369b4747227b4526a271390278e9ac0fc3
parent5536893c6e629d9541c75a1b0b239eaa96c6eaeb (diff)
downloademacs-5aff1bfdaf6fb64b50087c93f212faa18fbe17fb.tar.gz
emacs-5aff1bfdaf6fb64b50087c93f212faa18fbe17fb.zip
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).
-rw-r--r--lisp/progmodes/sh-script.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index a417de32640..d3692d47205 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1556,7 +1556,7 @@ with your script for an edit-interpret-debug cycle."
1556 (sh-set-shell 1556 (sh-set-shell
1557 (cond ((save-excursion 1557 (cond ((save-excursion
1558 (goto-char (point-min)) 1558 (goto-char (point-min))
1559 (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")) 1559 (looking-at auto-mode-interpreter-regexp))
1560 (match-string 2)) 1560 (match-string 2))
1561 ((not buffer-file-name) sh-shell-file) 1561 ((not buffer-file-name) sh-shell-file)
1562 ;; Checks that use `buffer-file-name' follow. 1562 ;; Checks that use `buffer-file-name' follow.