summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-debug.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index fb7eeb1..46d4509 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -13,6 +13,7 @@
(require 'geiser-impl)
(require 'geiser-eval)
+(require 'geiser-menu)
(require 'geiser-popup)
(require 'geiser-base)
@@ -37,6 +38,16 @@
(setq major-mode 'geiser-debug-mode)
(setq buffer-read-only t))
+(defun geiser-debug--button-p (nextp)
+ (let ((m (funcall (if nextp 'next-button 'previous-button) (point))))
+ (and m (funcall (if nextp '< '>) (point) (marker-position m)))))
+
+(geiser-menu--defmenu debug geiser-debug-mode-map
+ ("Next error" "n" forward-button :enable (geiser-debug--button-p t))
+ ("Previous error" "p" backward-button :enable (geiser-debug--button-p t))
+ --
+ ("Quit" nil View-quit))
+
;;; Buffer for displaying evaluation results: