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
commit83b1e75799d56b33dbbcb56b3bc5f8741e3f4cd4 (patch)
treea33d1fc4c6e61cb208b8b3dce23c713931e19711 /elisp
parent03e7271ffdc381e69aae401666df56767799e836 (diff)
downloadgeiser-chez-83b1e75799d56b33dbbcb56b3bc5f8741e3f4cd4.tar.gz
geiser-chez-83b1e75799d56b33dbbcb56b3bc5f8741e3f4cd4.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))