summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-11 02:32:30 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-11 02:32:30 +0200
commit6eff04704863544eff626158b0fd318931693284 (patch)
tree69a37ccee01da5f06b36add978e40ed1be61618e /elisp
parent04e8eedba2e674b1faf368a5518e7e2e51971510 (diff)
downloadgeiser-6eff04704863544eff626158b0fd318931693284.tar.gz
geiser-6eff04704863544eff626158b0fd318931693284.tar.bz2
Bug fix: be aware of square brackets when retrieving context form.
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)))))