Function: kview:valid-position-p

kview:valid-position-p is a byte-compiled function defined in kview.el.

Signature

(kview:valid-position-p &optional POS)

Documentation

Return non-nil iff point or optional POS is where editing may occur.

The read-only positions between cells and within cell indentations are invalid.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kview:valid-position-p (&optional pos)
  "Return non-nil iff point or optional POS is where editing may occur.
The read-only positions between cells and within cell indentations are invalid."
  (when (cond ((null pos)
	       (>= (current-column) (kcell-view:indent)))
	      ((not (integer-or-marker-p pos))
	       (error "(kview:valid-position-p): Argument POS not an integer
or marker, `%s'" pos))
	      ((or (< pos (point-min)) (> pos (point-max)))
	       (error "(kview:valid-position-p): Invalid POS argument, `%d'"
		      pos))
	      (t (save-excursion
		   (goto-char pos)
		   (>= (current-column) (kcell-view:indent)))))
    ;; Still might be in spurious characters after the end of the
    ;; outline; check for this.
    (<= (point)
	(save-excursion
	  (goto-char (kcell-view:start))
	  (kcell-view:end-contents)))))