summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-syntax.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index c1ead64..a09c17e 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -100,7 +100,13 @@
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[.@,'`#\\\\]" nil t)
- (replace-match "" nil nil)))
+ (replace-match "" nil nil))
+ (goto-char (point-min))
+ (while (re-search-forward "\\[" nil t)
+ (replace-match "(" nil nil))
+ (goto-char (point-min))
+ (while (re-search-forward "\\]" nil t)
+ (replace-match ")" nil nil)))
(let ((depth (nth 0 (parse-partial-sexp (point-min) (point)))))
(unless (zerop depth) (insert (make-string depth ?\)))))
(when (< (point-min) (point)) (buffer-substring (point-min) (point)))))