Function: glc-get-descript
glc-get-descript is a byte-compiled function defined in goto-chg.el.
Signature
(glc-get-descript E &optional N)
Documentation
If E represents an edit, return a short string describing E.
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
(t nil))) ; (marker ...)==marker moved
(defun glc-get-descript (e &optional n)
"If E represents an edit, return a short string describing E.
Return nil if E represents no real change.
\nE is an entry in the buffer-undo-list."
(setq e (glc-fixup-edit e))
(let ((nn (or (format "T-%d: " n) "")))
(cond ((numberp e) "New position") ; num==changed position
((atom e) nil) ; nil==command boundary
((numberp (car e)) ; (beg . end)==insertion
(if (and n (< n 2))
(format "%sInserted %d chars \"%s\"" nn (- (cdr e) (car e))
(glc-center-ellipsis (buffer-substring (car e) (cdr e)) 60))
;; else
;; An older insert. The inserted text cannot easily be computed.
;; Just show the char count.
(format "%sInserted %d chars" nn (- (cdr e) (car e)))))
((stringp (car e)) ; (string . pos)==deletion
(format "%sDeleted \"%s\"" nn (glc-center-ellipsis (car e) 60)))
((null (car e)) ; (nil ...)==text property change
(format "%sProperty change" nn))
((atom (car e)) nil) ; (t ...)==file modification time
(t nil)))) ; (marker ...)==marker moved