do not define keymap if winum-keymap-prefix is nil
This commit is contained in:
parent
84de252877
commit
0ba8f4ba74
11
winum.el
11
winum.el
|
@ -94,16 +94,17 @@ numbers in the mode-line.")
|
|||
:group 'winum
|
||||
:type '(repeat string))
|
||||
|
||||
(defface winum-face '()
|
||||
"Face used for the number in the mode-line."
|
||||
:group 'winum)
|
||||
|
||||
(defcustom winum-keymap-prefix (kbd "C-x w")
|
||||
"Prefix key sequence for keybindings."
|
||||
:group 'winum
|
||||
:type 'string)
|
||||
|
||||
(defface winum-face '()
|
||||
"Face used for the number in the mode-line."
|
||||
:group 'winum)
|
||||
|
||||
(defvar winum-keymap
|
||||
(when winum-keymap-prefix
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(let ((prefix-map (make-sparse-keymap)))
|
||||
(define-key prefix-map (kbd "`") 'winum-select-window-by-number)
|
||||
|
@ -118,7 +119,7 @@ numbers in the mode-line.")
|
|||
(define-key prefix-map (kbd "8") 'winum-select-window-8)
|
||||
(define-key prefix-map (kbd "9") 'winum-select-window-9)
|
||||
(define-key map winum-keymap-prefix prefix-map))
|
||||
map)
|
||||
map))
|
||||
"Keymap used for `winum-mode'.")
|
||||
|
||||
;; Internal variables ----------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue