Fix completion symbol name in README

Fix one of the jinx's function not defined warning
This commit is contained in:
Adam Kruszewski 2023-07-03 16:24:10 +02:00
parent c088313d92
commit e57860e12a

View file

@ -50,15 +50,18 @@
(defun cape-jinx-completion-suggest-for-word (word) (defun cape-jinx-completion-suggest-for-word (word)
"Return suggestions as a list for `WORD'." "Return suggestions as a list for `WORD'."
(when (not jinx--dicts) (when (not jinx--dicts)
(when (not (fboundp #'jinx--mod-dict)) (when (not (fboundp 'jinx--mod-dict))
(jinx--load-module)) (jinx--load-module))
(jinx--load-dicts)) (jinx--load-dicts))
(if (fboundp 'jinx--mod-suggest)
(let* ((result '())) (let* ((result '()))
(dolist (dict jinx--dicts) (dolist (dict jinx--dicts)
(dolist (el (jinx--mod-suggest dict word)) (dolist (el (jinx--mod-suggest dict word))
(when (string-prefix-p word el) (when (string-prefix-p word el)
(cl-pushnew el result)))) (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) ;; cape-jinx-completion (based on cape-dict)
(defgroup cape-jinx-completion nil (defgroup cape-jinx-completion nil