diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-03-07 21:29:13 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-03-07 21:29:13 +0100 |
commit | 9a14aa781cf79eccf20aba73b91dce65c26ff2e2 (patch) | |
tree | 5a251902023043bfbd34347f9f7a334069a52135 /elisp/geiser-completion.el | |
parent | 9f5d185d17c1e7258b9dc3df5fce46de7945ff12 (diff) | |
download | geiser-guile-9a14aa781cf79eccf20aba73b91dce65c26ff2e2.tar.gz geiser-guile-9a14aa781cf79eccf20aba73b91dce65c26ff2e2.tar.bz2 |
Implementations can now specify additional binding forms.
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r-- | elisp/geiser-completion.el | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el index 9efe89f..09c021f 100644 --- a/elisp/geiser-completion.el +++ b/elisp/geiser-completion.el @@ -134,11 +134,25 @@ terminates a current completion." ;;; Completion functionality: +(defvar geiser-completion--binding-forms nil) +(geiser-impl--register-local-variable + 'geiser-completion--binding-forms 'binding-forms nil + "A list of forms introducing local bindings, a la let or lambda.") + +(defvar geiser-completion--binding-forms* nil) +(geiser-impl--register-local-variable + 'geiser-completion--binding-forms* 'binding-forms* nil + "A list of forms introducing nested local bindings, a la let*.") + +(defsubst geiser-completion--locals () + (mapcar 'symbol-name + (geiser-syntax--locals-around-point + geiser-completion--binding-forms + geiser-completion--binding-forms*))) + (defun geiser-completion--symbol-list (prefix) (delete-duplicates - (append (all-completions prefix - (mapcar 'symbol-name - (geiser-syntax--locals-around-point))) + (append (all-completions prefix (geiser-completion--locals)) (geiser-eval--send/result `(:eval ((:ge completions) ,prefix)))) :test 'string=)) |