Function: kotl-mode:maybe-shrink-region-p
kotl-mode:maybe-shrink-region-p is a byte-compiled function defined in
kotl-mode.el.
Signature
(kotl-mode:maybe-shrink-region-p)
Documentation
Shrink active region if kotl-mode:shrink-region-flag is non-nil.
Shrink any active region that includes hidden text or crosses cell boundaries. The region then falls within the first visible cell that was part of the region or that followed it
Return t unless any region problem is left uncorrected, notably in cases where kotl-mode:shrink-region-flag is nil.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:maybe-shrink-region-p ()
"Shrink active region if `kotl-mode:shrink-region-flag' is non-nil.
Shrink any active region that includes hidden text or crosses
cell boundaries. The region then falls within the first visible
cell that was part of the region or that followed it
Return t unless any region problem is left uncorrected, notably in
cases where `kotl-mode:shrink-region-flag' is nil."
;; This function is called from pre-command-hook, so don't trigger
;; any error as that will delete it from pre-command-hook and it
;; will no longer be called.
;;
(if (not (eq major-mode 'kotl-mode))
t
;; Deactivate empty region
(when (eq (point) (when mark-active (mark)))
(deactivate-mark))
(if (not (kotl-mode:valid-region-p))
(if kotl-mode:shrink-region-flag
(progn (kotl-mode:shrink-region) t)
(message "(Hyperbole): Limit the region to a single visible cell or set `kotl-mode:shrink-region-flag'.")
(beep)
nil)
t)))