summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-08-17 16:23:45 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-08-17 16:24:16 +0200
commit18db590dece0f88c3f2bd850a3158bb50605e2c6 (patch)
treeabd90db428d4f6d2da5f2134b18b4a5bfd297df7 /elisp/geiser-syntax.el
parent283e6f040449bb4f740991956007332c48308b38 (diff)
downloadgeiser-guile-18db590dece0f88c3f2bd850a3158bb50605e2c6.tar.gz
geiser-guile-18db590dece0f88c3f2bd850a3158bb50605e2c6.tar.bz2
Well, i said that it was better, not that it was perfect.
Autodoc buglets and support for displaying module variables too.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 475a556..6cadf61 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -97,29 +97,31 @@
(defun geiser-syntax--scan-sexp ()
(let ((p (point))
(n -1)
- prev
- head)
+ prev head)
(ignore-errors
(backward-up-list)
(save-excursion
(forward-char)
- (skip-syntax-forward "^_w" p)
+ (skip-syntax-forward "^_w(" p)
(when (setq head (symbol-at-point))
(while (< (point) p)
(setq n (1+ n))
(setq prev (symbol-at-point))
(forward-sexp))))
- (if head (list head n prev) 'skip))))
+ (if head (list head n (and (> n 1) prev)) 'skip))))
(defun geiser-syntax--scan-sexps ()
(save-excursion
(goto-char (or (nth 8 (syntax-ppss)) (point)))
(let* ((sap (symbol-at-point))
- (path (and sap `((,sap 0))))
- s)
- (while (setq s (geiser-syntax--scan-sexp))
- (when (listp s) (push s path)))
- path)))
+ (fst (and sap (geiser-syntax--scan-sexp)))
+ (path (and fst
+ (cond ((not (listp fst)) `((,sap 0)))
+ ((eq sap (car fst)) (list fst))
+ (t (list fst (list sap 0)))))))
+ (while (setq fst (geiser-syntax--scan-sexp))
+ (when (listp fst) (push fst path)))
+ (nreverse path))))
(defun geiser-syntax--complete-partial-sexp (buffer begin end)
(geiser-syntax--with-buffer