summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-08 02:14:03 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-08 02:14:03 +0100
commit5713490e2ca1bb5ac77cddbbaf97cce5ac9fa0b1 (patch)
tree6da78a06c4e34ca9d0d47466c77c46eb55fee7ba
parentfd87a78cd54874a7f8260cdae11868d6ab718f09 (diff)
downloadgeiser-chez-5713490e2ca1bb5ac77cddbbaf97cce5ac9fa0b1.tar.gz
geiser-chez-5713490e2ca1bb5ac77cddbbaf97cce5ac9fa0b1.tar.bz2
Hook to setup the debugger when it's launched.
-rw-r--r--elisp/geiser-connection.el15
-rw-r--r--elisp/geiser-debug.el5
2 files changed, 5 insertions, 15 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index f5b5928..577ca97 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -158,12 +158,7 @@
(format "\\(%s\\)\\|\\(%s\\)" prompt-regexp debug-prompt-regexp)
prompt-regexp))
(setq comint-prompt-regexp comint-redirect-finished-regexp)
- (add-hook 'comint-redirect-hook 'geiser-con--comint-redirect-hook nil t)
- (when debug-prompt-regexp
- (add-hook 'comint-redirect-filter-functions
- 'geiser-con--debug-watcher
- nil
- t)))
+ (add-hook 'comint-redirect-hook 'geiser-con--comint-redirect-hook nil t))
;;; Requests handling:
@@ -234,14 +229,6 @@
(geiser-con--connection-clean-current-request
geiser-con--connection)))))
-(defun geiser-con--debug-watcher (pstr)
- (when (string-match-p geiser-con--debugging-prompt-regexp pstr)
- (setq comint-redirect-echo-input t)
- (setq pstr (concat (with-current-buffer comint-redirect-output-buffer
- (buffer-string))
- pstr)))
- pstr)
-
(defadvice comint-redirect-setup
(after geiser-con--advice
(output-buffer comint-buffer finished-regexp &optional echo))
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index b181ef5..cfa193c 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -59,7 +59,10 @@ non-null value.")
(output (geiser-eval--retort-output ret))
(impl geiser-impl--implementation)
(module (geiser-eval--get-module)))
- (if (eq key 'geiser-debugger) (switch-to-geiser)
+ (if (eq key 'geiser-debugger)
+ (progn
+ (switch-to-geiser)
+ (geiser-debug--display-error impl module key output))
(geiser-debug--with-buffer
(erase-buffer)
(insert what)