From 27bb04d499cd92780e331998f04e5dac222aa9da Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 27 Oct 2014 12:43:45 +0100 Subject: raise buffer: take optional mode argument --- grid-engine-mode.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/grid-engine-mode.el b/grid-engine-mode.el index 9eec231..5fa6122 100644 --- a/grid-engine-mode.el +++ b/grid-engine-mode.el @@ -63,19 +63,21 @@ (cdr (assoc key columns))) grid-engine-column-order)))) -(defun grid-engine--raise-buffer (&optional buffer) +(defun grid-engine--raise-buffer (&optional buffer mode) (when buffer (set-buffer buffer)) (goto-char (point-min)) (pop-to-buffer-same-window (current-buffer)) - (grid-engine)) + (when mode + (funcall mode))) -(defun grid-engine--split-buffer (&optional buffer) +(defun grid-engine--split-buffer (&optional buffer mode) (when buffer (set-buffer buffer)) (goto-char (point-min)) (display-buffer (current-buffer)) - (grid-engine)) + (when mode + (funcall mode))) (defun grid-engine--default-directory () (if grid-engine-host @@ -142,7 +144,7 @@ (mapcar (lambda (job) (job-to-row job)) jobs))) - (grid-engine--raise-buffer) + (grid-engine--raise-buffer nil 'grid-engine-list-mode) ;; update list (tabulated-list-print) (message nil))) -- cgit v1.2.3