From e57860e12a255e8a21b4952f08383800ccd2aafb Mon Sep 17 00:00:00 2001 From: Adam Kruszewski Date: Mon, 3 Jul 2023 16:24:10 +0200 Subject: [PATCH] Fix completion symbol name in README Fix one of the jinx's function not defined warning --- cape-jinx-completion.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cape-jinx-completion.el b/cape-jinx-completion.el index 071da38..9e5de6e 100644 --- a/cape-jinx-completion.el +++ b/cape-jinx-completion.el @@ -50,15 +50,18 @@ (defun cape-jinx-completion-suggest-for-word (word) "Return suggestions as a list for `WORD'." (when (not jinx--dicts) - (when (not (fboundp #'jinx--mod-dict)) + (when (not (fboundp 'jinx--mod-dict)) (jinx--load-module)) (jinx--load-dicts)) + (if (fboundp 'jinx--mod-suggest) (let* ((result '())) (dolist (dict jinx--dicts) (dolist (el (jinx--mod-suggest dict word)) (when (string-prefix-p word el) (cl-pushnew el result)))) - (delete-dups result))) + (delete-dups result)) + ;; this should never happen, as jinx--load-module will bind jinx--mod-suggest as well. + '())) ;; cape-jinx-completion (based on cape-dict) (defgroup cape-jinx-completion nil