From 64ba8a37a52e1b07605915931825de399cb5646a Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Tue, 15 Jun 2010 03:19:03 +0200 Subject: Menu for debug buffer. --- elisp/geiser-debug.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'elisp/geiser-debug.el') 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: -- cgit v1.2.3