]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/treesit.el: Remove TODO for integration with thing-at-point.
authorJuri Linkov <juri@linkov.net>
Wed, 12 Feb 2025 17:41:12 +0000 (19:41 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 13 Feb 2025 11:51:34 +0000 (12:51 +0100)
At this point, thing-at-point with all standard things
is already supported by treesit, for example:
"(thing-at-point 'defun)" by treesit-beginning-of-defun,
"(thing-at-point 'sexp)" by treesit-forward-sexp,
"(thing-at-point 'list)" by treesit-up-list,
"(thing-at-point 'sentence)" by treesit-forward-sentence,
"(thing-at-point 'comment)" by treesit-forward-comment.
https://lists.gnu.org/archive/html/emacs-devel/2025-02/msg00384.html

(cherry picked from commit b514ec87b618e4ee9a95b248eb55c5e0cc69949c)

lisp/treesit.el

index 0f4b1110200156bbd1633b6f2876412440d2a8ad..917a19c7a3f1802440fff67a5b4b86a5d38a4016 100644 (file)
@@ -2781,9 +2781,6 @@ friends."
 ;;
 ;; There are also some defun-specific functions, like
 ;; treesit-defun-name, treesit-add-log-current-defun.
-;;
-;; TODO: Integration with thing-at-point: once our thing interface is
-;; stable.
 
 (defvar-local treesit-defun-type-regexp nil
   "A regexp that matches the node type of defun nodes.
@@ -3250,7 +3247,6 @@ function is called recursively."
     ;; Counter equal to 0 means we successfully stepped ARG steps.
     (if (eq counter 0) pos nil)))
 
-;; TODO: In corporate into thing-at-point.
 (defun treesit-thing-at-point (thing tactic)
   "Return the THING at point, or nil if none is found.