Skip to content

Instantly share code, notes, and snippets.

View ShingoFukuyama's full-sized avatar

Shingo Fukuyama ShingoFukuyama

  • Japan
View GitHub Profile
@stassats
stassats / key-stats.el
Created August 18, 2011 12:08
Statistics of Emacs commands
(defvar key-stats-commands ())
(defun key-stats-record-command ()
(when (and (stringp (this-command-keys))
(not (eql this-command 'self-insert-command)))
(let* ((keys (this-command-keys))
(keys-list (assoc major-mode key-stats-commands))
(command (assoc keys (cdr keys-list))))
(cond (command
(incf (cdr command)))