Function: abbrev--suggest-get-totals
abbrev--suggest-get-totals is a byte-compiled function defined in
abbrev.el.gz.
Signature
(abbrev--suggest-get-totals)
Documentation
Return a list of all expansions and how many times they were used.
Each expansion in the returned list is a cons cell where the car is the
expansion text and the cdr is the number of times the expansion has been
typed.
Source Code
;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun abbrev--suggest-get-totals ()
"Return a list of all expansions and how many times they were used.
Each expansion in the returned list is a cons cell where the `car' is the
expansion text and the `cdr' is the number of times the expansion has been
typed."
(let (total cell)
(dolist (expansion abbrev--suggest-saved-recommendations)
(if (not (assoc (car expansion) total))
(push (cons (car expansion) 1) total)
(setq cell (assoc (car expansion) total))
(setcdr cell (1+ (cdr cell)))))
total))