Function: projectile-replace--positions-valid-p
projectile-replace--positions-valid-p is a byte-compiled function
defined in projectile.el.
Signature
(projectile-replace--positions-valid-p MATCHES)
Documentation
Return non-nil when every match in MATCHES still spans its recorded text.
Checked against the current buffer. This is the authoritative guard against stale positions: if the file changed on disk, or the live buffer was edited, since the scan, the recorded spans no longer hold the matched text and applying them would corrupt unrelated bytes.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-replace--positions-valid-p (matches)
"Return non-nil when every match in MATCHES still spans its recorded text.
Checked against the current buffer. This is the authoritative guard
against stale positions: if the file changed on disk, or the live buffer
was edited, since the scan, the recorded spans no longer hold the matched
text and applying them would corrupt unrelated bytes."
(cl-every (lambda (m)
(let ((beg (projectile-replace--match-beg m))
(end (projectile-replace--match-end m)))
(and (integerp beg) (integerp end)
(<= (point-min) beg end (point-max))
(string= (buffer-substring-no-properties beg end)
(projectile-replace--match-string m)))))
matches))