emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#59471: closed ([PATCH] sh-mode: Run treesit-ready-p only when sh-she


From: GNU bug Tracking System
Subject: bug#59471: closed ([PATCH] sh-mode: Run treesit-ready-p only when sh-shell is 'bash)
Date: Wed, 23 Nov 2022 01:40:02 +0000

Your message dated Tue, 22 Nov 2022 17:39:08 -0800
with message-id <16C1E196-AD5B-4358-BCFD-BF5995EC21D0@gmail.com>
and subject line Re: bug#59471: [PATCH] sh-mode: Run treesit-ready-p only when  
sh-shell is 'bash
has caused the debbugs.gnu.org bug report #59471,
regarding [PATCH] sh-mode: Run treesit-ready-p only when sh-shell is 'bash
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59471: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59471
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] sh-mode: Run treesit-ready-p only when sh-shell is 'bash Date: Tue, 22 Nov 2022 02:54:55 +0000
Tags: patch

This patch guards the treesit-ready-p check to run only when sh-shell is
'bash, in order to prevent an annoying warning when viewing (say) sh or
zsh files. But maybe we also want to allow treesitter when sh-shell is
'sh?


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)
Repository revision: aeadba1418d8fc18f17b4ae415cde35e9e272e7a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: NixOS 22.11 (Raccoon)

Configured using:
 'configure
 --prefix=/nix/store/yf7bpm9w6nqwil5xfxa9iz22m57wz4l1-emacs-git-20221121.0
 --disable-build-details --with-modules --with-x-toolkit=lucid
 --with-xft --with-cairo --with-native-compilation'

Attachment: 0001-sh-mode-Run-treesit-ready-p-only-when-sh-shell-is-ba.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#59471: [PATCH] sh-mode: Run treesit-ready-p only when sh-shell is 'bash Date: Tue, 22 Nov 2022 17:39:08 -0800
Brian Leung <leungbk@posteo.net> writes:

> Tags: patch
>
> This patch guards the treesit-ready-p check to run only when sh-shell is
> 'bash, in order to prevent an annoying warning when viewing (say) sh or
> zsh files. But maybe we also want to allow treesitter when sh-shell is
> 'sh?

Oh, thanks! Though I did it a bit differently, by separating
tree-sitter-based mode into a independent major mode (sh-ts-mode), which
is in line with other tree-sitter-based modes (python-ts-mode,
js-ts-mode, etc).

How to make bash-ts-mode fallback to sh-mode when it encounters a shell
script other than bash is still in discussion.

Yuan


--- End Message ---

reply via email to

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