Function: kotl-mode:tree-end
kotl-mode:tree-end is a byte-compiled function defined in
kotl-mode.el.
Signature
(kotl-mode:tree-end &optional OMIT-END-NEWLINES)
Documentation
Return end point of current cell's tree within this view.
If optional OMIT-END-NEWLINES is non-nil, point returned precedes any newlines at end of tree.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:tree-end (&optional omit-end-newlines)
"Return end point of current cell's tree within this view.
If optional OMIT-END-NEWLINES is non-nil, point returned precedes any
newlines at end of tree."
(let* ((lbl-sep-len (kview:label-separator-length kotl-kview))
(start-indent (kcell-view:indent nil lbl-sep-len))
(next))
(save-excursion
(while (and (setq next (kcell-view:next nil lbl-sep-len))
(>= (- (kcell-view:indent nil lbl-sep-len) start-indent)
(kview:level-indent kotl-kview))))
(cond (next
(goto-char (progn (kcell-view:previous nil lbl-sep-len)
(kcell-view:end))))
(t (goto-char (kcell-view:end))))
(when omit-end-newlines
(skip-chars-backward "\n\r"))
(point))))