aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2025-04-15 20:33:14 +0300
committerJuri Linkov2025-04-15 20:33:14 +0300
commitaa24b9c849d13aa63de3079672003fb760bf511f (patch)
treec382ee739820639b2de60ccea71ad88102a643f2
parent0ac12aed09702b2d135312e8dad4e173fcd23dae (diff)
downloademacs-aa24b9c849d13aa63de3079672003fb760bf511f.tar.gz
emacs-aa24b9c849d13aa63de3079672003fb760bf511f.zip
* lisp/treesit.el (treesit-up-list): Signal an error.
Signal 'scan-error' when called noninteractively (bug#77744).
-rw-r--r--lisp/treesit.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index ae0ef56c65a..5a408b09507 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -3193,7 +3193,12 @@ ARG is described in the docstring of `up-list'."
3193 (goto-char (if (> arg 0) 3193 (goto-char (if (> arg 0)
3194 (treesit-node-end parent) 3194 (treesit-node-end parent)
3195 (treesit-node-start parent)))) 3195 (treesit-node-start parent))))
3196 (user-error "At top level"))) 3196 (if no-syntax-crossing
3197 ;; Assume called interactively; don't signal an error.
3198 (user-error "At top level")
3199 (signal 'scan-error
3200 (list (format-message "No more %S to move across" pred)
3201 (point) (point))))))
3197 (setq cnt (- cnt inc))))) 3202 (setq cnt (- cnt inc)))))
3198 3203
3199(defun treesit-cycle-sexp-type () 3204(defun treesit-cycle-sexp-type ()