summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-02 06:17:08 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-02 06:17:08 +0200
commit73c8e10e31336b2d1232d833a96b45d1e21c2324 (patch)
tree1ad362f22bbe7018cbdc477915f26b0a902cb31a /elisp
parent4399176fae8187e5b896e0d28e4b888b8c39b5d1 (diff)
downloadgeiser-chez-73c8e10e31336b2d1232d833a96b45d1e21c2324.tar.gz
geiser-chez-73c8e10e31336b2d1232d833a96b45d1e21c2324.tar.bz2
Racket: better stack traces using errortrace
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-racket.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index dcff4cc..d876714 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -158,6 +158,14 @@ This function uses `geiser-racket-init-file' if it exists."
"path:\"?\\([^>\"\n]+\\)\"?>"
"module: \"\\([^>\"\n]+\\)\""))
+(defconst geiser-racket--geiser-file-rx
+ "^/[^:\n\"]*/geiser/[^:\n\"]*:")
+
+(defun geiser-racket--purge-trace ()
+ (save-excursion
+ (while (re-search-forward geiser-racket--geiser-file-rx nil t)
+ (kill-whole-line))))
+
(defun geiser-racket--find-files (rx)
(save-excursion
(while (re-search-forward rx nil t)
@@ -179,6 +187,7 @@ This function uses `geiser-racket-init-file' if it exists."
(when key
(let ((end (point)))
(goto-char p)
+ (geiser-racket--purge-trace)
(mapc 'geiser-racket--find-files geiser-racket--file-rxs)
(goto-char end)
(newline)))))