Function: keyfreq-pre-command-hook
keyfreq-pre-command-hook is a natively compiled function defined in
keyfreq.el.
Signature
(keyfreq-pre-command-hook)
Documentation
Record command execution in keyfreq-table hash.
Source Code
;; Defined in /nix/store/vs0cnjcny583s3d1i80ya8g63h6xkwrn-emacs-packages-deps/share/emacs/site-lisp/elpa/keyfreq-20231107.106/keyfreq.el
(defun keyfreq-pre-command-hook ()
"Record command execution in `keyfreq-table' hash."
(let ((command real-last-command) count)
(when (and command (symbolp command))
(setq count (gethash (cons major-mode command) keyfreq-table))
(unless (keyfreq-match-p command)
(puthash (cons major-mode command) (if count (1+ count) 1)
keyfreq-table)
))))