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 | c1f1e17f18ec5a8408dc1b987634349ed3e07c10 (patch) | |
tree | 920f736856028e14ef902ddc0ee25ddcbb16bcfd /elisp/geiser-syntax.el | |
parent | 783c68684fcdc1826a24e8aa3a299a6de41ed12c (diff) | |
download | geiser-c1f1e17f18ec5a8408dc1b987634349ed3e07c10.tar.gz geiser-c1f1e17f18ec5a8408dc1b987634349ed3e07c10.tar.bz2 |
Autodoc for identifier at point only when it's not an argument.
Diffstat (limited to 'elisp/geiser-syntax.el')
-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)) |