emacs-devel
[Top][All Lists]
Advanced

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

Re: Code navigation for sh-mode with Tree-sitter


From: João Paulo Labegalini de Carvalho
Subject: Re: Code navigation for sh-mode with Tree-sitter
Date: Tue, 6 Dec 2022 18:12:25 -0700



On Tue, Dec 6, 2022 at 4:50 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> However, with negative arguments that does not happen, as
> `sh-mode--treesit-beginning-of-defun' moves point to (beginning of) the
> closest sibling function (after point) and
> `sh-mode--treesit-end-of-defun' moves
> point to (end of) the closest sibling function (before point).  In this
> case, the selected functions to which point move to are not the same.

Please read the docstring of `end-of-defun-function`, because I suspect
that you are confused about what it's supposed to do.  E.g. it's not
supposed to "move point to (end of) the closest sibling function", so
I think you'll need to set it to a different function than
`sh-mode--treesit-end-of-defun`.

Indeed. I was trying to impose the behavior I desired to achieve instead of the intended use. I corrected that in my patch. 

Looking forward to comments and suggestions for the patch.

--
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

Attachment: 0001-Basic-navigation-for-bash-ts-mode.patch
Description: Text Data


reply via email to

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