diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-11 02:32:30 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-11 02:32:30 +0200 |
commit | 6eff04704863544eff626158b0fd318931693284 (patch) | |
tree | 69a37ccee01da5f06b36add978e40ed1be61618e /elisp/geiser-syntax.el | |
parent | 04e8eedba2e674b1faf368a5518e7e2e51971510 (diff) | |
download | geiser-6eff04704863544eff626158b0fd318931693284.tar.gz geiser-6eff04704863544eff626158b0fd318931693284.tar.bz2 |
Bug fix: be aware of square brackets when retrieving context form.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 8 |
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))))) |