summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 8f8d7af..3f8aa4b 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -116,7 +116,14 @@ This function uses `geiser-guile-init-file' if it exists."
(defun geiser-guile--linearize (str)
(if (string-match "\n" str)
(with-temp-buffer
+ (set-syntax-table scheme-mode-syntax-table)
(insert str)
+ (goto-char (point-min))
+ (let ((kill-whole-line nil))
+ (while (> (skip-syntax-forward "^<") 0)
+ (let ((p (point)))
+ (end-of-line)
+ (kill-region p (point)))))
(subst-char-in-region (point-min) (point-max) ?\n ? t)
(buffer-string))
str))