;; This file: http://user.it.uu.se/~embe8573/conf/emacs-init/show-command.el (defun show-key-command (&optional the-key command) (interactive) (let*((key-prompt "(hit key!)") (prompt (if command (format " %s %s " command key-prompt) key-prompt)) (key (or the-key (read-key-sequence-vector prompt))) (new-command (key-binding key)) (command-or-undefined (or new-command "undefined")) ) (if the-key (message "%s" command-or-undefined) (unless (equal key [7]) ; [7] is C-g (show-key-command nil command-or-undefined) )))) ;; (show-key-command) ;; (show-key-command "\^\[m") ;; M-m ;; (show-key-command "\^k") ;; C-k ;; (show-key-command "\^ck") ;; C-c k