diff options
author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2014-10-27 11:35:25 +0100 |
---|---|---|
committer | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2014-10-27 11:35:25 +0100 |
commit | 0e3953c90cb3cee022ab56634619a717dd717ee1 (patch) | |
tree | 62f7bc268836f2b1fff6b2416267ed664a6f86aa | |
parent | 5c10eaf282cdbe6c97d9ecc6eafc6598b3c3285c (diff) |
derive mode from tabulated-list-mode
-rw-r--r-- | grid-engine-mode.el | 25 |
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) |