--- 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