GNU bug report logs - #59471
[PATCH] sh-mode: Run treesit-ready-p only when sh-shell is 'bash

Previous Next

Package: emacs;

Reported by: Brian Leung <leungbk <at> posteo.net>

Date: Tue, 22 Nov 2022 02:56:02 UTC

Severity: normal

Tags: patch

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 59471-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: leungbk <at> posteo.net
Cc: 59471-done <at> debbugs.gnu.org
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 <at> 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




This bug report was last modified 2 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.