diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2023-03-20 20:18:42 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2023-03-20 20:18:42 +0200 |
commit | 7a1272168af1a5b82979efa29451147c5d867981 (patch) | |
tree | 1bec570714eacc7b41dd80b2a51dcb169708d2e3 | |
parent | 263d6c38539691c954f4c3057cbe8d5468499b91 (diff) | |
download | emacs-7a1272168af1a5b82979efa29451147c5d867981.tar.gz |
* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).
-rw-r--r-- | lisp/treesit.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el index c118f5d52a4..b271a1f0c4b 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -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. |