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 | d603b236b6debf43f9b5bfb7f25312527ae51dc3 (patch) | |
tree | e99c1b7b84ddddac3effcf1ac8777dc8113b975e | |
parent | 8e9a3eb9870b781b42bf4f2f4488579ad417e84f (diff) | |
download | geiser-chez-d603b236b6debf43f9b5bfb7f25312527ae51dc3.tar.gz geiser-chez-d603b236b6debf43f9b5bfb7f25312527ae51dc3.tar.bz2 |
More robust sexp scanning for autodoc.
-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))) |