Function: undo-adjust-pos
undo-adjust-pos is a byte-compiled function defined in simple.el.gz.
Signature
(undo-adjust-pos POS DELTAS &optional USE-<)
Documentation
Return adjustment of POS by the undo DELTAS list, comparing with < or <= based on USE-<.
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun undo-adjust-pos (pos deltas &optional use-<)
"Return adjustment of POS by the undo DELTAS list, comparing
with < or <= based on USE-<."
(dolist (d deltas pos)
(when (if use-<
(< (car d) pos)
(<= (car d) pos))
(setq pos
;; Don't allow pos to become less than the undo-delta
;; position. This edge case is described in the overview
;; comments.
(max (car d) (- pos (cdr d)))))))