Function: track-changes--recover-from-error
track-changes--recover-from-error is a byte-compiled function defined
in track-changes.el.gz.
Signature
(track-changes--recover-from-error &optional INFO)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/track-changes.el.gz
(defun track-changes--recover-from-error (&optional info)
;; We somehow got out of sync. This is usually the result of a bug
;; elsewhere that causes the before-c-f and after-c-f to be improperly
;; paired, or to be skipped altogether.
;; Not much we can do, other than force a full re-synchronization.
(if (not track-changes-record-errors)
(message "Recovering from confusing calls to `before/after-change-functions'!")
(warn "Missing/incorrect calls to `before/after-change-functions'!!
Details logged to `track-changes--error-log'")
(push (vector (buffer-name) info
(track-changes--backtrace
50 #'track-changes--recover-from-error)
(let ((rk (recent-keys 'include-cmds)))
(if (< (length rk) 20) rk (substring rk -20)))
(when (and (eq 'trace track-changes-record-errors)
(fboundp 'ring-elements))
(apply #'vector
(nreverse (ring-elements track-changes--trace)))))
track-changes--error-log))
(setq track-changes--before-clean 'unset)
(setq track-changes--buffer-size (buffer-size))
;; Create a new state disconnected from the previous ones!
;; Mark the previous one as junk, just to be clear.
(setf (track-changes--state-before track-changes--state) 'error)
(setq track-changes--state (track-changes--state)))