Skip to content

Commit 6d71712

Browse files
committed
Touch up clojure-ts--node-child-skip-metadata
1 parent cf90573 commit 6d71712

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clojure-ts-mode.el

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,9 @@ This does not include the NODE's namespace."
539539
(string-equal expected-symbol-name (clojure-ts--named-node-text node))))
540540

541541
(defun clojure-ts--node-child-skip-metadata (node n)
542-
"Return the Nth child of node like treesit-node-child, but skips the optional meta node at pos 0."
543-
(let* ((first-child (treesit-node-child node 0 t))
544-
(n1 (if (clojure-ts--metadata-node-p first-child) (1+ n) n)))
545-
(treesit-node-child node n1 t)))
542+
"Return the Nth child of NODE like `treesit-node-child`, skipping the optional metadata node at pos 0 if present."
543+
(let ((first-child (treesit-node-child node 0 t)))
544+
(treesit-node-child node (if (clojure-ts--metadata-node-p first-child) (1+ n) n) t)))
546545

547546
(defun clojure-ts--symbol-matches-p (symbol-regexp node)
548547
"Return non-nil if NODE is a symbol that matches SYMBOL-REGEXP."

0 commit comments

Comments
 (0)