From 8475bf8d28df2a0e73c649a76728e1a8a1886f37 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 27 Oct 2014 12:14:33 +0100 Subject: bind g to revert-buffer --- grid-engine-mode.el | 8 ++++++-- 1 file 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 "") (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) -- cgit v1.2.3