Function: glc-get-pos

glc-get-pos is a byte-compiled function defined in goto-chg.el.

Signature

(glc-get-pos E)

Documentation

If E represents an edit, return a position value in E, the position where the edit took place. Return nil if E represents no real change.

E is an entry in the buffer-undo-list.

Source Code

;; Defined in ~/.emacs.d/elpa/goto-chg-20240407.1110/goto-chg.el
(defun glc-get-pos (e)
  "If E represents an edit, return a position value in E, the position
where the edit took place. Return nil if E represents no real change.
\nE is an entry in the buffer-undo-list."
  (setq e (glc-fixup-edit e))
  (cond ((numberp e) e)                 ; num==changed position
        ((atom e) nil)                  ; nil==command boundary
        ((numberp (car e)) (cdr e))     ; (beg . end)==insertion
        ((stringp (car e)) (abs (cdr e))) ; (string . pos)==deletion
        ((null (car e)) (nthcdr 4 e))   ; (nil ...)==text property change
        ((atom (car e)) nil)            ; (t ...)==file modification time
        (t nil)))                       ; (marker ...)==marker moved