##// 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 70 ;;; Global keymap.
71 71
72 (defvar mq-global-map (make-sparse-keymap))
73 (fset 'mq-global-map mq-global-map)
74 (global-set-key mq-global-prefix 'mq-global-map)
75 (define-key mq-global-map "." 'mq-push)
76 (define-key mq-global-map ">" 'mq-push-all)
77 (define-key mq-global-map "," 'mq-pop)
78 (define-key mq-global-map "<" 'mq-pop-all)
79 (define-key mq-global-map "=" 'mq-diff)
80 (define-key mq-global-map "r" 'mq-refresh)
81 (define-key mq-global-map "e" 'mq-refresh-edit)
82 (define-key mq-global-map "i" 'mq-new)
83 (define-key mq-global-map "n" 'mq-next)
84 (define-key mq-global-map "o" 'mq-signoff)
85 (define-key mq-global-map "p" 'mq-previous)
86 (define-key mq-global-map "s" 'mq-edit-series)
87 (define-key mq-global-map "t" 'mq-top)
72 (defvar mq-global-map
73 (let ((map (make-sparse-keymap)))
74 (define-key map "." 'mq-push)
75 (define-key map ">" 'mq-push-all)
76 (define-key map "," 'mq-pop)
77 (define-key map "<" 'mq-pop-all)
78 (define-key map "=" 'mq-diff)
79 (define-key map "r" 'mq-refresh)
80 (define-key map "e" 'mq-refresh-edit)
81 (define-key map "i" 'mq-new)
82 (define-key map "n" 'mq-next)
83 (define-key map "o" 'mq-signoff)
84 (define-key map "p" 'mq-previous)
85 (define-key map "s" 'mq-edit-series)
86 (define-key map "t" 'mq-top)
87 map))
88
89 (global-set-key mq-global-prefix mq-global-map)
88 90
89 91 (add-minor-mode 'mq-mode 'mq-mode)
90 92
91 93
92 94 ;;; Refresh edit mode keymap.
93 95
94 (defvar mq-edit-mode-map (make-sparse-keymap))
95 (define-key mq-edit-mode-map "\C-c\C-c" 'mq-edit-finish)
96 (define-key mq-edit-mode-map "\C-c\C-k" 'mq-edit-kill)
97 (define-key mq-edit-mode-map "\C-c\C-s" 'mq-signoff)
96 (defvar mq-edit-mode-map
97 (let ((map (make-sparse-keymap)))
98 (define-key map "\C-c\C-c" 'mq-edit-finish)
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 104 ;;; Helper functions.
General Comments 0
You need to be logged in to leave comments. Login now