From 629f38d05e35faba3655936c68500785dba148a2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 21 Nov 2010 05:25:37 +0100 Subject: Better message on completion failure Tell people that we're trying to complete, sometimes, on two different prefixes. --- elisp/geiser-completion.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'elisp') diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el index b33c976..33593b6 100644 --- a/elisp/geiser-completion.el +++ b/elisp/geiser-completion.el @@ -223,7 +223,7 @@ we're looking for a module name.") (buffer-substring-no-properties (geiser-completion--symbol-begin module) (point))) -(defun geiser-completion--complete-symbol (&optional arg) +(defun geiser-completion--complete-symbol (&optional arg previous) "Complete the symbol at point. Perform completion similar to Emacs' complete-symbol. With prefix, complete module name." @@ -237,9 +237,14 @@ With prefix, complete module name." (partial (cdr result))) (cond ((null completions) (if (not arg) - (geiser-completion--complete-symbol t) - (geiser--respecting-message "Can't find completion for %S" - prefix) + (geiser-completion--complete-symbol t prefix) + (geiser--respecting-message "Can't find completion for %S%s" + prefix + (if (and previous + (not (equalp previous + prefix))) + (format " or %S" previous) + "")) (geiser-completion--restore-window-cfg))) (t (insert-and-inherit (substring partial (length prefix))) (cond ((= (length completions) 1) -- cgit v1.2.3