EUDC: Fix eudc-capf-message-expand-name nil result

* lisp/net/eudc-capf.el (eudc-capf-message-expand-name): Return
nil if EUDC query returns no results.  (Bug#59314)
This commit is contained in:
Thomas Fitzsimmons 2022-11-16 20:29:26 -05:00
parent f696d27d1c
commit 17075a975f

View file

@ -123,11 +123,12 @@ queried for email addresses, and the results delivered to
(match-end 0)))
(end (point))
(prefix (save-excursion (buffer-substring-no-properties beg end))))
(list beg end
(completion-table-with-cache
(lambda (_)
(eudc-query-with-words (split-string prefix "[ \t]+") t))
t))))))
(let ((result
(eudc-query-with-words (split-string prefix "[ \t]+") t)))
(when result
(list beg end
(completion-table-with-cache
(lambda (_) result) t))))))))
(provide 'eudc-capf)
;;; eudc-capf.el ends here