]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix treesit-default-defun-skipper (bug#66711)
authorYuan Fu <casouri@gmail.com>
Mon, 11 Dec 2023 01:40:39 +0000 (17:40 -0800)
committerYuan Fu <casouri@gmail.com>
Mon, 11 Dec 2023 01:40:39 +0000 (17:40 -0800)
* lisp/treesit.el:
(treesit-default-defun-skipper): Add bol to the rx pattern.

lisp/treesit.el

index 9dc5d4970b6fe710665c7ddc0100ce774c0e1f45..8a07f5023a953e7124237d8b1115f6c36afc4cd1 100644 (file)
@@ -1962,7 +1962,7 @@ the current line if the beginning of the defun is indented."
          (forward-line 1))
         ;; Moving backward, but there are some whitespace (and only
         ;; whitespace) between point and BOL: go back to BOL.
-        ((looking-back (rx (+ (or " " "\t")))
+        ((looking-back (rx bol (+ (or " " "\t")))
                        (line-beginning-position))
          (beginning-of-line))))