Function: sh--redirect-bash-ts-mode
sh--redirect-bash-ts-mode is a byte-compiled function defined in
sh-script.el.gz.
Signature
(sh--redirect-bash-ts-mode OLDFN)
Documentation
Redirect to sh-mode if the current file is not written in Bash or sh.
OLDFN should be bash-ts-mode.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defun sh--redirect-bash-ts-mode (oldfn)
"Redirect to `sh-mode' if the current file is not written in Bash or sh.
OLDFN should be `bash-ts-mode'."
(let ((sh--redirect-recursing sh--redirect-recursing))
(funcall (if (or delay-mode-hooks sh--redirect-recursing)
oldfn
(setq sh--redirect-recursing t)
(if (member (file-name-base (sh--guess-shell)) '("bash" "sh"))
oldfn
#'sh-mode)))))