]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 20 Mar 2023 18:18:42 +0000 (20:18 +0200)
committerJuri Linkov <juri@linkov.net>
Mon, 20 Mar 2023 18:18:42 +0000 (20:18 +0200)
lisp/treesit.el

index c118f5d52a4307b2a7c7d24f27c96a35cd71cac6..b271a1f0c4ba395d25ae7fed11d2e7673925f0a0 100644 (file)
@@ -1882,6 +1882,7 @@ this function depends on `treesit-defun-type-regexp' and
 `treesit-defun-skipper'."
   (interactive "^p\nd")
   (let ((orig-point (point)))
+    (if (or (null arg) (= arg 0)) (setq arg 1))
     (catch 'done
       (dotimes (_ 2) ; Not making progress is better than infloop.