diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-10-15 10:05:44 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-10-15 10:05:44 +0200 |
commit | a17dad508cc8ef98d0a35c017a2ebad6cbc55e92 (patch) | |
tree | 9a89697a69391e07d3e9bf01e0c2c63147fa2b49 /elisp | |
parent | 0a64ea424dcacf61d5b8ad42e1a064f27cb58e49 (diff) | |
download | geiser-guile-a17dad508cc8ef98d0a35c017a2ebad6cbc55e92.tar.gz geiser-guile-a17dad508cc8ef98d0a35c017a2ebad6cbc55e92.tar.bz2 |
Autodoc for identifier at point only when it's not an argument.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-syntax.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index c961105..4c2623d 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -199,10 +199,9 @@ (if (cdr (last p)) (1+ (safe-length p)) (length p))) (defun geiser-syntax--scan-sexps () - (save-excursion - (geiser-syntax--skip-comment/string) - (let* ((fst (symbol-at-point)) - (path)) + (let ((path)) + (save-excursion + (geiser-syntax--skip-comment/string) (while (not (zerop (geiser-syntax--nesting-level))) (let ((boundary (1+ (point)))) (backward-up-list) @@ -215,11 +214,10 @@ (geiser-syntax--read/keyword-value prev)))) (push `(,(car form) ,len-1 ,@(and prev (symbolp prev) (list prev))) - path)))))) - (let ((path (nreverse path))) - (if (or (not fst) (eq fst (caar path))) - path - (cons (list fst 0) path)))))) + path))))))) + (if path (nreverse path) + (let ((fst (symbol-at-point))) + (and fst `((,fst 0))))))) (defun geiser-syntax--scan-locals (form partial locals) (flet ((if-symbol (x) (and (symbolp x) x)) |