summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-15 03:19:03 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-15 03:19:03 +0200
commit64ba8a37a52e1b07605915931825de399cb5646a (patch)
tree76e68a559f4a759f276e8c0a5ed5b662fe667056 /elisp
parent50669ab30243002035b9637c05b51e6b95397335 (diff)
downloadgeiser-guile-64ba8a37a52e1b07605915931825de399cb5646a.tar.gz
geiser-guile-64ba8a37a52e1b07605915931825de399cb5646a.tar.bz2
Menu for debug buffer.
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: