aboutsummaryrefslogtreecommitdiff
path: root/buildbot-view.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-07-15 15:06:06 +1000
committerYuchen Pei <id@ypei.org>2023-07-15 15:06:06 +1000
commit69a087571aa807008ba2f792926a2bda29d524bb (patch)
tree3b087f7d0007cf725e8fbfea7dfaf7ff7dc54940 /buildbot-view.el
parentb0b136970276c2988e5cd1c84911e966d68cce2f (diff)
Adding imenu support
Diffstat (limited to 'buildbot-view.el')
-rw-r--r--buildbot-view.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/buildbot-view.el b/buildbot-view.el
index a69b923..323d3bc 100644
--- a/buildbot-view.el
+++ b/buildbot-view.el
@@ -30,7 +30,8 @@
(require 'buildbot-client)
(require 'text-property-search)
-(defvar buildbot-view-header-regex "^\\[.*\\]$")
+(defvar buildbot-view-header-regex "^\\[.*\\]$"
+ "The header regex in a Buildbot buffer.")
(defvar buildbot-view-branch-change-limit 10)
(defvar buildbot-view-builder-build-limit 50)
;; 'revision, 'build, 'step, or 'log
@@ -51,7 +52,13 @@
"Keymap for `buildbot-view-mode'.")
(define-derived-mode buildbot-view-mode special-mode "Buildbot"
- "A Buildbot client for Emacs.")
+ "A Buildbot client for Emacs."
+ (setq-local imenu-generic-expression
+ (list (list nil
+ (format "^\\(?:%s\\).*$"
+ buildbot-view-header-regex)
+ 0))
+ imenu-space-replacement nil))
(defun buildbot-view-next-header (n)
"Move forward N headers."