blob: ff33db706d5395e36ae4290814f3375875b44b47 (
plain)
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
|
--- gle-mode.el~ 2005-04-27 11:19:52.000000000 +0200
+++ gle-mode.el 2008-10-14 10:56:58.000000000 +0200
@@ -167,27 +167,28 @@
(set (make-local-variable 'comment-start-skip) "!+\\s-*")
(set (make-local-variable 'font-lock-defaults)
'(gle-font-lock-keywords))
+ (run-hooks 'gle-mode-hook)
)
-(add-menu nil "GLE"
- '(
- ["View ps file" gle-view-postscript t]
- ["View png file" gle-view-png t ]
- "--------------------"
- ["Create ps file" gle-create-postscript t]
- "--------------------"
- ["Write graph" gle-write-standard-graph t]
- ))
+(define-key gle-mode-map [menu-bar gle-mode]
+ (cons "GLE" (make-sparse-keymap "GLE")))
+(define-key gle-mode-map [menu-bar gle-mode gle-write-standard-graph]
+ '("Write graph" . gle-write-standard-graph))
+(define-key gle-mode-map [menu-bar gle-mode separator-gle-mode-2]
+ '("--------------------"))
+(define-key gle-mode-map [menu-bar gle-mode gle-create-postscript]
+ '("Create ps file" . gle-create-postscript))
+(define-key gle-mode-map [menu-bar gle-mode separator-gle-mode-1]
+ '("--------------------"))
+(define-key gle-mode-map [menu-bar gle-mode gle-view-png]
+ '("View png file" . gle-view-png))
+(define-key gle-mode-map [menu-bar gle-mode gle-view-postscript]
+ '("View ps file" . gle-view-postscript))
-
-(setq major-mode 'gle-mode)
-(setq mode-name "GLE")
-(local-set-key "\t" " ")
-(global-set-key "\C-c\C-p" 'gle-create-postscript)
-(global-set-key "\C-c\C-v" 'gle-view-postscript)
-(global-set-key "\C-c\C-x" 'gle-view-x)
-(global-set-key "\C-c\C-b" 'gle-write-basic-commands)
-(run-hooks 'gle-mode-hook)
+(define-key gle-mode-map "\C-c\C-p" 'gle-create-postscript)
+(define-key gle-mode-map "\C-c\C-v" 'gle-view-postscript)
+(define-key gle-mode-map "\C-c\C-x" 'gle-view-x)
+(define-key gle-mode-map "\C-c\C-b" 'gle-write-basic-commands)
(provide 'gle-mode)
;; End gle-mode
|