diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-09 21:52:56 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-09 21:52:56 +0100 |
commit | 27916d2da2e43f231daff12249b19701f5a27b4f (patch) | |
tree | 8425627764ba5a195a25665da5a2c62ce2f221bd /elisp/geiser-completion.el | |
parent | d830e14a4010284b4085d9942bfd856b0360d793 (diff) | |
parent | f2bf4b2cda05fe8c32ee74ce3b5cce743d81de61 (diff) | |
download | geiser-guile-27916d2da2e43f231daff12249b19701f5a27b4f.tar.gz geiser-guile-27916d2da2e43f231daff12249b19701f5a27b4f.tar.bz2 |
Merge branch 'master' into guile-meta
Conflicts:
elisp/geiser-guile.el
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r-- | elisp/geiser-completion.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el index d346190..f88fae6 100644 --- a/elisp/geiser-completion.el +++ b/elisp/geiser-completion.el @@ -228,14 +228,19 @@ we're looking for a module name.") Perform completion similar to Emacs' complete-symbol. With prefix, complete module name." (interactive "P") + (unless (geiser-syntax--symbol-at-point) + (error "No symbol at point")) (geiser--respecting-message "Retrieving completions...") (let* ((prefix (geiser-completion--prefix arg)) - (result (geiser-completion--complete prefix arg)) + (result (and prefix (geiser-completion--complete prefix arg))) (completions (car result)) (partial (cdr result))) (cond ((null completions) - (geiser--respecting-message "Can't find completion for %S" prefix) - (geiser-completion--restore-window-cfg)) + (if (not arg) + (geiser-completion--complete-symbol t) + (geiser--respecting-message "Can't find completion for %S" + prefix) + (geiser-completion--restore-window-cfg))) (t (insert-and-inherit (substring partial (length prefix))) (cond ((= (length completions) 1) (geiser--respecting-message "Sole completion") |