##// END OF EJS Templates
mq.el: define keymaps as convensions
NIIMI Satoshi -
r5468:24eb1bf8 default
parent child Browse files
Show More
@@ -69,32 +69,36 b''
69
69
70 ;;; Global keymap.
70 ;;; Global keymap.
71
71
72 (defvar mq-global-map (make-sparse-keymap))
72 (defvar mq-global-map
73 (fset 'mq-global-map mq-global-map)
73 (let ((map (make-sparse-keymap)))
74 (global-set-key mq-global-prefix 'mq-global-map)
74 (define-key map "." 'mq-push)
75 (define-key mq-global-map "." 'mq-push)
75 (define-key map ">" 'mq-push-all)
76 (define-key mq-global-map ">" 'mq-push-all)
76 (define-key map "," 'mq-pop)
77 (define-key mq-global-map "," 'mq-pop)
77 (define-key map "<" 'mq-pop-all)
78 (define-key mq-global-map "<" 'mq-pop-all)
78 (define-key map "=" 'mq-diff)
79 (define-key mq-global-map "=" 'mq-diff)
79 (define-key map "r" 'mq-refresh)
80 (define-key mq-global-map "r" 'mq-refresh)
80 (define-key map "e" 'mq-refresh-edit)
81 (define-key mq-global-map "e" 'mq-refresh-edit)
81 (define-key map "i" 'mq-new)
82 (define-key mq-global-map "i" 'mq-new)
82 (define-key map "n" 'mq-next)
83 (define-key mq-global-map "n" 'mq-next)
83 (define-key map "o" 'mq-signoff)
84 (define-key mq-global-map "o" 'mq-signoff)
84 (define-key map "p" 'mq-previous)
85 (define-key mq-global-map "p" 'mq-previous)
85 (define-key map "s" 'mq-edit-series)
86 (define-key mq-global-map "s" 'mq-edit-series)
86 (define-key map "t" 'mq-top)
87 (define-key mq-global-map "t" 'mq-top)
87 map))
88
89 (global-set-key mq-global-prefix mq-global-map)
88
90
89 (add-minor-mode 'mq-mode 'mq-mode)
91 (add-minor-mode 'mq-mode 'mq-mode)
90
92
91
93
92 ;;; Refresh edit mode keymap.
94 ;;; Refresh edit mode keymap.
93
95
94 (defvar mq-edit-mode-map (make-sparse-keymap))
96 (defvar mq-edit-mode-map
95 (define-key mq-edit-mode-map "\C-c\C-c" 'mq-edit-finish)
97 (let ((map (make-sparse-keymap)))
96 (define-key mq-edit-mode-map "\C-c\C-k" 'mq-edit-kill)
98 (define-key map "\C-c\C-c" 'mq-edit-finish)
97 (define-key mq-edit-mode-map "\C-c\C-s" 'mq-signoff)
99 (define-key map "\C-c\C-k" 'mq-edit-kill)
100 (define-key map "\C-c\C-s" 'mq-signoff)
101 map))
98
102
99
103
100 ;;; Helper functions.
104 ;;; Helper functions.
General Comments 0
You need to be logged in to leave comments. Login now