From: Theodor Thornhill Date: Thu, 19 May 2022 16:35:13 +0000 (-0700) Subject: Fix typo and argument in treesit-beginning-of-defun, etc X-Git-Tag: emacs-29.0.90~1922 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35e2786c930d5c2125f2af8d1c224a480181dce9;p=emacs.git Fix typo and argument in treesit-beginning-of-defun, etc * lisp/treesit.el (treesit-beginning-of-defun, treesit-end-of-defun): Fix typo, add shield for argument. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 3313168d667..761c7147a0e 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -927,20 +927,20 @@ functions like `treesit-beginning-of-defun'.") With ARG, do it that many times. Negative ARG means move forward to the ARGth following beginning of defun. Defun is defined -according to `treesit-defun-pattern'." +according to `treesit-defun-query'." (unless treesit-defun-query (error "Variable `treesit-defun-query' is unset")) - (treesit-search-beginning treesit-defun-query (- arg))) + (treesit-search-beginning treesit-defun-query (- (or arg 1)))) (defun treesit-end-of-defun (&optional arg) "Move forward to the end of a defun. With ARG, do it that many times. Negative ARG means move back to ARGth preceding end of defun. Defun is defined according to -`treesit-defun-pattern'." +`treesit-defun-query'." (unless treesit-defun-query (error "Variable `treesit-defun-query' is unset")) - (treesit-search-end treesit-defun-query arg)) + (treesit-search-end treesit-defun-query (or arg 1))) ;;; Debugging