Function: keyfreq-table-load
keyfreq-table-load is a natively compiled function defined in
keyfreq.el.
Signature
(keyfreq-table-load TABLE)
Documentation
Load all values from the keyfreq-file and add them in the TABLE.
The table is not reset, so the values are appended to the table.
Source Code
;; Defined in /nix/store/vs0cnjcny583s3d1i80ya8g63h6xkwrn-emacs-packages-deps/share/emacs/site-lisp/elpa/keyfreq-20231107.106/keyfreq.el
(defun keyfreq-table-load (table)
"Load all values from the `keyfreq-file' and add them in the TABLE.
The table is not reset, so the values are appended to the table."
;; Does `keyfreq-file' exist?
(if (file-exists-p keyfreq-file)
;; Load sexp
(let ((l (with-temp-buffer
(insert-file-contents keyfreq-file)
(goto-char (point-min))
(read (current-buffer)))))
;; Add the values in the table
(while (and (listp l) l)
(if (listp (car l))
(unless (keyfreq-match-p (cdr (caar l)))
(puthash (caar l) (+ (gethash (caar l) table 0) (cdar l)) table)))
(setq l (cdr l)))
)))