-
Notifications
You must be signed in to change notification settings - Fork 9
/
magik-keys.el
executable file
·87 lines (66 loc) · 3.19 KB
/
magik-keys.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
;;; magik-keys.el --- bind all the Magik keys, menus and mouse actions.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(eval-when-compile
(require 'magik-utils)
(require 'magik-mode)
(require 'magik-session)
(require 'magik-cb))
(require 'magik-menu)
(defun magik-customize ()
"Open Customization buffer for Smallword Development."
(interactive)
(customize-group 'magik))
;;;###autoload
(defun magik-global-bindings ()
"Setup the default Smallworld key bindings."
;; ---------------------- top-level globals --------------------------
(global-set-key [f6] 'magik-copy-method)
(global-set-key [f7] 'magik-transmit-method)
(global-set-key [f8] 'magik-transmit-region)
(global-set-key [f9] 'magik-mark-method)
;; ------------------- F2 globals ----------------------
(global-unset-key (kbd "<f2>"))
(global-set-key (kbd "<f2> <f7>") 'magik-transmit-method)
(global-set-key (kbd "<f2> <f8>") 'magik-transmit-region)
(global-set-key (kbd "<f2> RET") 'magik-transmit-thing)
(global-set-key (kbd "<f2> #") 'magik-comment-region)
(global-set-key (kbd "<f2> ESC #") 'magik-uncomment-region)
(global-set-key (kbd "<f2> b") 'magik-transmit-buffer)
;; (global-set-key (kbd "<f2> h") 'magik-heading)
(global-set-key (kbd "<f2> m") 'magik-transmit-method)
(global-set-key (kbd "<f2> r") 'magik-transmit-region)
(global-set-key (kbd "<f2> q") 'magik-fill-public-comment)
(global-set-key (kbd "<f2> t") 'magik-trace-curr-statement)
(global-set-key (kbd "<f2> SPC") 'magik-explicit-electric-space)
;; (global-set-key (kbd "<f2> x") 'deep-print)
;; (global-set-key (kbd "<f2> <f1>") 'sw-help-keys)
;; (global-set-key (kbd "<f2> [") 'toggle-debug)
(global-set-key (kbd "<f2> TAB") 'hippie-expand)
(global-set-key (kbd "<f2> e") 'magik-electric-mode)
;; (global-set-key (kbd "<f2> k") 'sw-reload-dotemacs)
(global-set-key (kbd "<f2> s") 'magik-version-selection)
(global-set-key (kbd "<f2> z") 'magik-session)
;; ------------------- F3 globals ----------------------
(global-unset-key (kbd "<f3>"))
(global-set-key (kbd "<f3> <f3>") 'magik-cb)
(global-set-key (kbd "<f3> b") 'magik-cb-paste-method-and-class)
(global-set-key (kbd "<f3> c") 'magik-cb-paste-class)
(global-set-key (kbd "<f3> j") 'magik-cb-jump-to-source)
(global-set-key (kbd "<f3> m") 'magik-cb-paste-method)
(global-set-key (kbd "<f3> /") 'magik-cb-and-clear)
;; (global-set-key (kbd "<f3> ?") 'magik-cb-help)
)
(provide 'magik-keys)
;;; magik-keys.el ends here