From 440b40c47d553d53ece268e2988123feaadbb2d6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 11 May 2009 02:32:30 +0200 Subject: Bug fix: be aware of square brackets when retrieving context form. --- elisp/geiser-syntax.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'elisp') 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))))) -- cgit v1.2.3