From: Dmitry Gutov Date: Tue, 2 Jan 2024 13:32:03 +0000 (+0200) Subject: treesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3f9506ceba5e3ece73182f53e93c0b5949c4c97;p=emacs.git treesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize * lisp/treesit.el (treesit--pre-syntax-ppss): Make sure the lower bound is still within the current restriction (bug#67977). (cherry picked from commit 1a677d1429d1f9fea2d6b2bc9dd5644a5564cc27) --- diff --git a/lisp/treesit.el b/lisp/treesit.el index a68eed06e41..c8b473c7bb8 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1393,7 +1393,7 @@ START and END mark the current to-be-propertized region." (if (and new-start (< new-start start)) (progn (setq treesit--syntax-propertize-start nil) - (cons new-start end)) + (cons (max new-start (point-min)) end)) nil))) ;;; Indent