diff options
-rw-r--r-- | buildbot-view.el | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/buildbot-view.el b/buildbot-view.el index 214444d..a45aa60 100644 --- a/buildbot-view.el +++ b/buildbot-view.el @@ -36,7 +36,15 @@ (end-of-line 1) (re-search-forward buildbot-view-header-regex) (beginning-of-line 1))) -(define-key buildbot-view-mode-map "n" 'buildbot-view-next-header) +(define-key buildbot-view-mode-map (kbd "M-n") 'buildbot-view-next-header) + +(defun buildbot-view-next-failed-header (n) + (interactive "p") + (dotimes (_ n) + (end-of-line 1) + (text-property-search-forward 'face 'error) + (beginning-of-line 1))) +(define-key buildbot-view-mode-map "n" 'buildbot-view-next-failed-header) (defun buildbot-view-next-header-same-thing (n) (interactive "p") @@ -46,7 +54,7 @@ (buildbot-view-next-header 1) (while (not (eq (get-text-property (point) 'type) type)) (buildbot-view-next-header 1))))) -(define-key buildbot-view-mode-map (kbd "M-n") +(define-key buildbot-view-mode-map "f" 'buildbot-view-next-header-same-thing) (defun buildbot-view-previous-header (n) @@ -56,7 +64,17 @@ (re-search-backward buildbot-view-header-regex)) (dotimes (_ n) (re-search-backward buildbot-view-header-regex))) -(define-key buildbot-view-mode-map "p" 'buildbot-view-previous-header) +(define-key buildbot-view-mode-map (kbd "M-p") 'buildbot-view-previous-header) + +(defun buildbot-view-previous-failed-header (n) + (interactive "p") + (beginning-of-line 1) + (unless (looking-at buildbot-view-header-regex) + (re-search-backward buildbot-view-header-regex)) + (dotimes (_ n) + (text-property-search-backward 'face 'error)) + (beginning-of-line 1)) +(define-key buildbot-view-mode-map "p" 'buildbot-view-previous-failed-header) (defun buildbot-view-previous-header-same-thing (n) (interactive "p") @@ -66,7 +84,7 @@ (buildbot-view-previous-header 1) (while (not (eq (get-text-property (point) 'type) type)) (buildbot-view-previous-header 1))))) -(define-key buildbot-view-mode-map (kbd "M-p") +(define-key buildbot-view-mode-map (kbd "b") 'buildbot-view-previous-header-same-thing) (defun buildbot-view-format-revision-info (revision-info) |