diff options
Diffstat (limited to 'lisp/progmodes/sh-script.el')
| -rw-r--r-- | lisp/progmodes/sh-script.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8479c3cfd9a..4d025eeb18d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1583,7 +1583,9 @@ with your script for an edit-interpret-debug cycle." This mode automatically falls back to `sh-mode' if the buffer is not written in Bash or sh." :syntax-table sh-mode-syntax-table - (when (treesit-ensure-installed 'bash) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'bash) + (treesit-ready-p 'bash)) (sh-set-shell "bash" nil nil) (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) (add-hook 'hack-local-variables-hook |
