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 | 440b40c47d553d53ece268e2988123feaadbb2d6 (patch) | |
tree | 7375c6273415ac533ae1c0d9811207448037c821 /elisp | |
parent | 273866952c4037d9585dd97c42c822bc6c40187e (diff) | |
download | geiser-guile-440b40c47d553d53ece268e2988123feaadbb2d6.tar.gz geiser-guile-440b40c47d553d53ece268e2988123feaadbb2d6.tar.bz2 |
Bug fix: be aware of square brackets when retrieving context form.
Diffstat (limited to 'elisp')
-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))))) |