diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-19 02:14:53 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-19 02:14:53 +0100 |
commit | c9d2c699ecd4e9dee6033ccc59a454bbb9bb3085 (patch) | |
tree | ca615b73986c1115c8480fb7242fb05a0625ca49 /elisp | |
parent | 54e80a001c937953625d5156c35b7769c2f6ba7a (diff) | |
download | geiser-c9d2c699ecd4e9dee6033ccc59a454bbb9bb3085.tar.gz geiser-c9d2c699ecd4e9dee6033ccc59a454bbb9bb3085.tar.bz2 |
More robust sexp scanning for autodoc.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-syntax.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index f0148e2..c1ead64 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -97,10 +97,13 @@ (delete-region (point) (point-max)) t)) (insert geiser-syntax--placeholder)) + (save-excursion + (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-no-properties (point-min) (point))))) + (when (< (point-min) (point)) (buffer-substring (point-min) (point))))) (defsubst geiser-syntax--get-partial-sexp () (unless (zerop (nth 0 (syntax-ppss))) |