summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-01 00:03:31 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-01 00:03:31 +0100
commit061559ee48e45d1f7ecb8082346b5ef1f5f523ae (patch)
treed3003fb4b6171d427ecaa9031a9edc651d3aebae /elisp
parent4f0c19c4bacdd7173a9c3b31a3e065996f78f1a0 (diff)
downloadgeiser-guile-061559ee48e45d1f7ecb8082346b5ef1f5f523ae.tar.gz
geiser-guile-061559ee48e45d1f7ecb8082346b5ef1f5f523ae.tar.bz2
Guile: suppress embedded comments when sending multi-line sexps
Diffstat (limited to 'elisp')
-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))