diff --git a/winum.el b/winum.el index d7be766..e6c5ea9 100644 --- a/winum.el +++ b/winum.el @@ -97,18 +97,32 @@ return a number to have it assigned to the current-window, nil otherwise." "Face used for the number in the mode-line." :group 'winum) -(defvar winum-keymap (let ((map (make-sparse-keymap))) - (define-key map "\M-0" 'select-window-0) - (define-key map "\M-1" 'select-window-1) - (define-key map "\M-2" 'select-window-2) - (define-key map "\M-3" 'select-window-3) - (define-key map "\M-4" 'select-window-4) - (define-key map "\M-5" 'select-window-5) - (define-key map "\M-6" 'select-window-6) - (define-key map "\M-7" 'select-window-7) - (define-key map "\M-8" 'select-window-8) - (define-key map "\M-9" 'select-window-9) - map) +(defvar winum-keymap + (let ((map (make-sparse-keymap))) + (define-key map (kbd "M-m `") 'select-window-by-number) + (define-key map (kbd "M-m 0") 'select-window-0-or-10) + (define-key map (kbd "M-m 1") 'select-window-1) + (define-key map (kbd "M-m 2") 'select-window-2) + (define-key map (kbd "M-m 3") 'select-window-3) + (define-key map (kbd "M-m 4") 'select-window-4) + (define-key map (kbd "M-m 5") 'select-window-5) + (define-key map (kbd "M-m 6") 'select-window-6) + (define-key map (kbd "M-m 7") 'select-window-7) + (define-key map (kbd "M-m 8") 'select-window-8) + (define-key map (kbd "M-m 9") 'select-window-9) + + (define-key map (kbd "C-`") 'select-window-by-number) + (define-key map (kbd "M-0") 'select-window-0-or-10) + (define-key map (kbd "M-1") 'select-window-1) + (define-key map (kbd "M-2") 'select-window-2) + (define-key map (kbd "M-3") 'select-window-3) + (define-key map (kbd "M-4") 'select-window-4) + (define-key map (kbd "M-5") 'select-window-5) + (define-key map (kbd "M-6") 'select-window-6) + (define-key map (kbd "M-7") 'select-window-7) + (define-key map (kbd "M-8") 'select-window-8) + (define-key map (kbd "M-9") 'select-window-9) + map) "Keymap used in by `winum-mode'.") ;;;###autoload