[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-guile 55c37c7 109/284: Guile: Minimal support for t
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-guile 55c37c7 109/284: Guile: Minimal support for the new REPL debug mode. |
Date: |
Sun, 1 Aug 2021 18:29:26 -0400 (EDT) |
branch: elpa/geiser-guile
commit 55c37c72c7a0c04c1ca2e1642776c673c6c6a3a7
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Guile: Minimal support for the new REPL debug mode.
We just don't hang when the REPL enters its debug mode, and salute any
attempt at using a Geiser command with a warning (and no result).
---
elisp/geiser-guile.el | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index ccc048c..3008878 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -48,7 +48,9 @@ started."
;;; REPL support:
(defun geiser-guile--binary ()
- (if (listp geiser-guile-binary) (car geiser-guile-binary)
geiser-guile-binary))
+ (if (listp geiser-guile-binary)
+ (car geiser-guile-binary)
+ geiser-guile-binary))
(defun geiser-guile--parameters ()
"Return a list with all parameters needed to start Guile.
@@ -63,9 +65,31 @@ This function uses `geiser-guile-init-file' if it exists."
(defconst geiser-guile--prompt-regexp "^[^() \n]+@([^)]*?)> ")
+;;; Catching the debugger
+(make-variable-buffer-local
+ (defvar geiser-guile--is-debugging nil))
+
+(defun geiser-guile--is-debugging ()
+ (with-current-buffer (geiser-repl--get-repl geiser-impl--implementation)
+ geiser-guile--is-debugging))
+
+(defvar geiser-guile--debugger-prompt-regexp "[0-9]+ debug> *$")
+(defun geiser-guile--watch-debugger (str)
+ (setq geiser-guile--is-debugging
+ (string-match-p geiser-guile--debugger-prompt-regexp str)))
+
+(defun geiser-guile--startup ()
+ (add-hook 'comint-output-filter-functions
+ 'geiser-guile--watch-debugger
+ nil
+ t))
+
+
;;; Evaluation support:
(defun geiser-guile--geiser-procedure (proc)
+ (when (geiser-guile--is-debugging)
+ (error "(Guile REPL is in debug mode)"))
(let ((proc (intern (format "ge:%s" (if (eq proc 'eval) 'compile proc)))))
`(@ (geiser emacs) ,proc)))
@@ -145,7 +169,7 @@ This function uses `geiser-guile-init-file' if it exists."
(define-geiser-implementation guile
(binary geiser-guile--binary)
(arglist geiser-guile--parameters)
- (startup)
+ (startup geiser-guile--startup)
(prompt-regexp geiser-guile--prompt-regexp)
(marshall-procedure geiser-guile--geiser-procedure)
(find-module geiser-guile--get-module)
- [nongnu] elpa/geiser-guile 8f57a6a 034/284: Autodoc system revamped., (continued)
- [nongnu] elpa/geiser-guile 8f57a6a 034/284: Autodoc system revamped., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile f48e83f 065/284: Accept a list as Guile binary., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 4e1d945 088/284: Simpler, more correct and efficient autodoc implementation., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6d3f98b 085/284: Guile: unbreaking evaluation., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 0e5a52b 090/284: Leftover removed., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 58ae3a1 100/284: Cosmetics., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 5807a76 105/284: Guile: adjustment to stack size display., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile a405f22 104/284: Guile: fix for file loading (we always compile them now)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 134606d 102/284: Guile: Support for multiple arities in autodoc., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile c34995d 110/284: Guile: support for the REPL debugger, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 55c37c7 109/284: Guile: Minimal support for the new REPL debug mode.,
Philip Kaludercic <=
- [nongnu] elpa/geiser-guile a9f26f1 115/284: Guile: slightly better compilation error regexps., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 11c2d58 138/284: Guile: excluding anonymous module names from completion., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1c9457a 116/284: Guile: heuristically resolving relative paths in REPL errors., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile f1ac35f 140/284: Guile: filtering gensym names in autodoc display., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6baa7d3 124/284: Guile: better stack trace limits during evaluation., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 14c1689 132/284: Guile: no more module loading under the rug., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile e43cfa8 121/284: Guile: evaluation fixes (current git head)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d41ac93 123/284: Debugging leftover., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6907aea 145/284: Guile: geiser commands working at the debugging prompt., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1178462 155/284: Guile: show error message upon entering the debugger, Philip Kaludercic, 2021/08/01