Function: eca-chat--region-lines-range
eca-chat--region-lines-range is a natively compiled function defined
in eca-chat-context.el.
Signature
(eca-chat--region-lines-range)
Documentation
Return the active region as a lines range plist (:start N :end M).
Lines are absolute (1-based, ignoring narrowing) since consumers resolve them against the whole file or buffer. A region ending at the beginning of a line (whole-lines selection) does not include that line.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-context.el
(defun eca-chat--region-lines-range ()
"Return the active region as a lines range plist (:start N :end M).
Lines are absolute (1-based, ignoring narrowing) since consumers
resolve them against the whole file or buffer. A region ending at
the beginning of a line (whole-lines selection) does not include
that line."
(let* ((rb (region-beginning))
(re (region-end))
(re (if (and (> re rb)
(save-excursion (goto-char re) (bolp)))
(1- re)
re)))
(list :start (line-number-at-pos rb t)
:end (line-number-at-pos re t))))