summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-13 03:50:23 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-13 03:50:23 +0200
commitf9d746bd4600d34d3b3fe72d5159b58d6160bfb9 (patch)
tree43039b53c38b6668a7221c4a882146eb9f0aace2 /elisp/geiser-syntax.el
parent176afa86ec0da835c6dc60fa80495a1bc96f5db7 (diff)
downloadgeiser-f9d746bd4600d34d3b3fe72d5159b58d6160bfb9.tar.gz
geiser-f9d746bd4600d34d3b3fe72d5159b58d6160bfb9.tar.bz2
Guile: rewriting stack trace captures - not yet complete.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el38
1 files changed, 23 insertions, 15 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 472a4e5..14d996c 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -85,20 +85,27 @@
(geiser-popup--define syntax " *geiser syntax analyst*" scheme-mode)
(defun geiser-syntax--prepare-scheme-for-elisp-reader ()
- (goto-char (point-min))
- (while (re-search-forward "#\<\\([^>]*?\\)\>" nil t)
- (let ((from (match-beginning 1))
- (to (match-end 1)))
- (goto-char from)
- (while (re-search-forward "\\([() ;'`]\\)" to t)
- (replace-match "\\\\\\1"))
- (goto-char to)))
- (goto-char (point-min))
- (while (re-search-forward "#(" nil t) (replace-match "(vector "))
- (goto-char (point-min))
- (while (re-search-forward "#" nil t) (replace-match "\\\\#"))
- (goto-char (point-min))
- (skip-syntax-forward "^("))
+ (let ((end (save-excursion
+ (goto-char (point-max))
+ (and (re-search-backward "(output \\. \"" nil t)
+ (point)))))
+ (goto-char (point-min))
+ (while (re-search-forward "#\<\\([^>]*?\\)\>" end t)
+ (let ((from (match-beginning 1))
+ (to (match-end 1)))
+ (goto-char from)
+ (while (re-search-forward "\\([ ;'`]\\)" to t)
+ (replace-match "\\\\\\1"))
+ (goto-char from)
+ (while (re-search-forward "[()]" to t)
+ (replace-match ""))
+ (goto-char to)))
+ (goto-char (point-min))
+ (while (re-search-forward "#(" end t) (replace-match "(vector "))
+ (goto-char (point-min))
+ (while (re-search-forward "#" end t) (replace-match "\\\\#"))
+ (goto-char (point-min))
+ (skip-syntax-forward "^(")))
(defsubst geiser-syntax--del-sexp (arg)
(let ((p (point)))
@@ -121,7 +128,8 @@
(when p ;; inside a comment or string
(delete-region p (point-max))
(insert geiser-syntax--placeholder)))
- (when (cond ((eq (char-after (1- (point))) ?\)) (geiser-syntax--del-sexp -1) t)
+ (when (cond ((eq (char-after (1- (point))) ?\))
+ (geiser-syntax--del-sexp -1) t)
((geiser-syntax--beginning-of-form)
(delete-region (point) (point-max)) t)
((memq (char-after (1- (point))) (list ?. ?@ ?, ?\' ?\` ?\# ?\\))