Function: ruby-ts--bol

ruby-ts--bol is a byte-compiled function defined in ruby-ts-mode.el.gz.

Signature

(ruby-ts--bol PRED)

Documentation

Return bol of PRED.

PRED should take (node parent bol &rest rest) and return a node. Returns bol of the current line if PRED returns nil.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ruby-ts-mode.el.gz
(defun ruby-ts--bol (pred)
  "Return bol of PRED.
PRED should take (node parent bol &rest rest) and return a node.
Returns bol of the current line if PRED returns nil."
  (lambda (node parent bol &rest rest)
    (save-excursion
      (let ((temp (treesit-node-start (funcall pred node parent bol rest))))
        (if temp
            (goto-char temp))
        (back-to-indentation)
        (point)))))