diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-10 17:11:45 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-10 17:11:45 +0100 |
commit | 6bc5dce3118a78e2665bbf981dc61866329269c1 (patch) | |
tree | 0b0f77490c888806fd6216ef57cb3668285525ae /elisp/geiser-syntax.el | |
parent | 710d1f8be59066f0b52d07b0f43343b3ab671ffa (diff) | |
download | geiser-guile-6bc5dce3118a78e2665bbf981dc61866329269c1.tar.gz geiser-guile-6bc5dce3118a78e2665bbf981dc61866329269c1.tar.bz2 |
Multi-level form arity recognition in autodoc.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 5f109cf..32b28bb 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -66,16 +66,20 @@ (defun geiser-syntax--enclosing-form-data () (save-excursion (let ((p (geiser-syntax--end-of-thing)) - (arg-no 0) - (proc)) + (current (cons (symbol-at-point) 0)) + (data)) (ignore-errors - (backward-up-list) - (forward-char) - (setq proc (symbol-at-point)) - (while (< (point) p) - (forward-sexp) - (when (< (point) p) (setq arg-no (1+ arg-no)))) - (cons proc arg-no))))) + (while (not (bobp)) + (backward-up-list) + (save-excursion + (forward-char) + (let ((proc (symbol-at-point)) + (arg-no 0)) + (while (< (point) p) + (forward-sexp) + (when (< (point) p) (setq arg-no (1+ arg-no)))) + (push (cons proc arg-no) data))))) + (reverse (push current data))))) (defun geiser-syntax--prepare-scheme-for-elisp-reader () (goto-char (point-min)) |