summaryrefslogtreecommitdiff
path: root/grid-engine-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'grid-engine-mode.el')
-rw-r--r--grid-engine-mode.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/grid-engine-mode.el b/grid-engine-mode.el
index 60220dc..a023f30 100644
--- a/grid-engine-mode.el
+++ b/grid-engine-mode.el
@@ -1,7 +1,18 @@
;;; -*- lexical-binding: t -*-
+(require 'derived)
+
+(define-derived-mode grid-engine
+ tabulated-list-mode "Grid Engine"
+ "Major mode for interacting with Grid Engine.
+ \\{grid-engine-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
+ (setq major-mode 'grid-engine)
+ (setq mode-name "Grid Engine")
+ (grid-engine-setup)
+ (use-local-map grid-engine-map)
+ (run-hooks 'grid-engine-hook))
-(defcustom grid-engine-map nil
- "Keymap for Grid Engine mode.")
(defcustom grid-engine-host nil
"The host on which Grid Engine is running. Defaults to localhost.")
(defcustom grid-engine-qstat "/opt/sge/bin/lx-amd64/qstat"
@@ -146,14 +157,4 @@
(grid-engine--cmd-to-buffer cmd title)
(grid-engine--split-buffer)))
-
-(defun grid-engine ()
- "Major mode for interacting with Grid Engine."
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'grid-engine)
- (setq mode-name "Grid Engine")
- (grid-engine-setup)
- (use-local-map grid-engine-map)
- (run-hooks 'grid-engine-hook))
(provide 'grid-engine-mode)