[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5aff1bf 1/2: Make sh-mode use `auto-mode-interpreter-regexp'

From: Lars Ingebrigtsen
Subject: master 5aff1bf 1/2: Make sh-mode use `auto-mode-interpreter-regexp'
Date: Tue, 19 Jan 2021 21:54:27 -0500 (EST)

branch: master
commit 5aff1bfdaf6fb64b50087c93f212faa18fbe17fb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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
 lisp/progmodes/sh-script.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index a417de3..d3692d4 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."
    (cond ((save-excursion
             (goto-char (point-min))
-            (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ 
+            (looking-at auto-mode-interpreter-regexp))
           (match-string 2))
          ((not buffer-file-name) sh-shell-file)
          ;; Checks that use `buffer-file-name' follow.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]