[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 7a1272168af: * lisp/treesit.el (treesit-end-of-defun): Guard ar
From: |
Juri Linkov |
Subject: |
emacs-29 7a1272168af: * lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158). |
Date: |
Mon, 20 Mar 2023 14:21:34 -0400 (EDT) |
branch: emacs-29
commit 7a1272168af1a5b82979efa29451147c5d867981
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Juri Linkov <juri@linkov.net>
* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).
---
lisp/treesit.el | 1 +
1 file changed, 1 insertion(+)
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 7a1272168af: * lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).,
Juri Linkov <=