summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2023-07-05 18:26:41 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2023-07-05 18:26:41 +0200
commit60757869e08c2040edc561eaa282d83c1c1b3027 (patch)
tree961453508f146ecd0f3f56a6958c9a9d91619f1e
parent28a2a1655026ae68ed9180db6527694334c5d1d4 (diff)
cape-dict: Disable sorting
-rw-r--r--cape.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/cape.el b/cape.el
index 5ecb303..1e20b8a 100644
--- a/cape.el
+++ b/cape.el
@@ -528,8 +528,9 @@ See the user options `cape-dabbrev-min-length' and
;;;###autoload
(defun cape-dict (&optional interactive)
"Complete word from dictionary at point.
-See the custom option `cape-dict-file'.
-If INTERACTIVE is nil the function acts like a Capf."
+This completion function works best if the dictionary is sorted
+by frequency. See the custom option `cape-dict-file'. If
+INTERACTIVE is nil the function acts like a Capf."
(interactive (list t))
(if interactive
(cape-interactive #'cape-dict)
@@ -539,6 +540,7 @@ If INTERACTIVE is nil the function acts like a Capf."
(completion-table-case-fold
(cape--cached-table beg end #'cape--dict-list)
(not (cape--case-fold-p cape-dict-case-fold)))
+ :sort nil ;; Presorted word list (by frequency)
:category 'cape-dict)
,@cape--dict-properties))))