Function: keyfreq-show
keyfreq-show is an interactive and natively compiled function defined
in keyfreq.el.
Signature
(keyfreq-show &optional MAJOR-MODE-SYMBOL)
Documentation
Show command usage statistics in keyfreq-buffer.
If MAJOR-MODE-SYMBOL is given, the function shows the statistics for that particular major mode only.
With a universal argument, the major-mode of the current buffer is used as MAJOR-MODE-SYMBOL argument.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/vs0cnjcny583s3d1i80ya8g63h6xkwrn-emacs-packages-deps/share/emacs/site-lisp/elpa/keyfreq-20231107.106/keyfreq.el
(defun keyfreq-show (&optional major-mode-symbol)
"Show command usage statistics in `keyfreq-buffer'.
If MAJOR-MODE-SYMBOL is given, the function shows the statistics
for that particular major mode only.
With a universal argument, the major-mode of the current buffer
is used as MAJOR-MODE-SYMBOL argument."
(interactive (list (cond (current-prefix-arg major-mode)
(t nil))))
(let ((table (copy-hash-table keyfreq-table)))
;; Merge with the values in `keyfreq-file'
(keyfreq-table-load table)
(let* ((list (keyfreq-list
(cond
(major-mode-symbol (keyfreq-filter-major-mode table major-mode-symbol))
(t (keyfreq-groups-major-modes table)))))
(formatted-list (keyfreq-format-list list t)))
;; Display the table
(display-message-or-buffer (concat (if major-mode-symbol
(concat "For " (symbol-name major-mode))
(concat "For all major modes"))
":\n\n"
formatted-list)
keyfreq-buffer)
)))