 (defun fstar-subp-retract-until (pos)
   "Retract blocks until POS is in unprocessed region."
   (cl-loop for overlay in (reverse (fstar-subp-tracking-overlays))
-           when (>= (overlay-end overlay) pos)
+           when (> (overlay-end overlay) pos) ;; End point is not inclusive
            do (fstar-subp-retract-one overlay)))
 
 (defun fstar-subp-advance-until (pos)

           when (fstar-subp-issue-overlay-p overlay)
           collect overlay))

(defun fstar-subp-read-only-hook (&rest _args)
  "Prevent modifications."
  (unless inhibit-read-only
    (error "Region is read-only")))
(add-to-list 'debug-ignored-errors "Region is read-only")

(defun fstar-subp-set-status (overlay status)
  "Set status of OVERLAY to STATUS."

    (overlay-put overlay 'fstar-subp-status status)
    (overlay-put overlay 'priority -1) ;;FIXME this is not an allowed value
    (overlay-put overlay 'face (intern face-name))
    (overlay-put overlay 'insert-in-front-hooks '(fstar-subp-overlay-attempt-modification))
    (overlay-put overlay 'modification-hooks '(fstar-subp-overlay-attempt-modification))))

(defun fstar-subp-process-overlay (overlay)
  "Send the contents of OVERLAY to the underlying F* process."
