summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2014-10-27 12:14:33 +0100
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2014-10-27 12:14:33 +0100
commit8475bf8d28df2a0e73c649a76728e1a8a1886f37 (patch)
treef654350e2ccc4b11bd113d9d1de417f0526c2038
parentbced250f60d2c322447961d9e9ba358fd8e39a00 (diff)
bind g to revert-buffer
-rw-r--r--grid-engine-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/grid-engine-mode.el b/grid-engine-mode.el
index 2cc441b..7c1242d 100644
--- a/grid-engine-mode.el
+++ b/grid-engine-mode.el
@@ -11,6 +11,11 @@
(setq mode-name "Grid Engine")
(grid-engine--init-keymap)
(grid-engine--init-header)
+
+ (add-hook 'tabulated-list-revert-hook
+ (lambda ()
+ (grid-engine--init-header)
+ (grid-engine-list-jobs)))
(use-local-map grid-engine-map)
(run-hooks 'grid-engine-hook))
@@ -30,6 +35,7 @@
(define-key grid-engine-map (kbd "n") 'next-logical-line)
(define-key grid-engine-map (kbd "p") 'previous-logical-line)
(define-key grid-engine-map (kbd "q") 'bury-buffer)
+ (define-key grid-engine-map (kbd "g") 'revert-buffer)
(define-key grid-engine-map (kbd "<RET>")
(lambda (&optional arg)
(interactive)
@@ -38,8 +44,6 @@
(unless (and field job)
(error "[Grid Engine] point is not on a field of a job record"))
(grid-engine-job-details field job arg))))
- (define-key grid-engine-map (kbd "g")
- (lambda () (interactive) (grid-engine-list-jobs))))
(defun grid-engine--init-header ()
(grid-engine-update-list-format)