* lisp/minibuffer.el (completion-at-point): Emit warning for ill-behaved

completion functions.
This commit is contained in:
Stefan Monnier 2014-09-29 20:48:31 -04:00
parent 7348668952
commit a19f0977a9
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2014-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion-at-point): Emit warning for ill-behaved
completion functions.
2014-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
* ses.el (ses--letref): Quote value before it gets re-evaluated.

View file

@ -2106,7 +2106,11 @@ The completion method is determined by `completion-at-point-functions'."
(completion-in-region start end collection
(plist-get plist :predicate))))
;; Maybe completion already happened and the function returned t.
(_ (cdr res)))))
(_
(when (cdr res)
(message "Warning: %S failed to return valid completion data!"
(car res)))
(cdr res)))))
(defun completion-help-at-point ()
"Display the completions on the text around point.