diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2023-03-07 06:30:10 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2023-03-07 06:30:10 +0100 |
commit | 8179555730d23f43b3043df0bfecc9f9c4f36eda (patch) | |
tree | fbb46c0fa15588d422ee96abd8630b6b2d1cb411 /lisp/icomplete.el | |
parent | 1e5393a57a3bbe3f9167fee59232c2e424afadf2 (diff) | |
parent | bd07cec844257ba8ae95b2ab2e66982360576c9d (diff) | |
download | emacs-8179555730d23f43b3043df0bfecc9f9c4f36eda.tar.gz |
Merge from origin/emacs-29
bd07cec8442 Fix regression in Fido mode (bug#62015)
0e3c7ac13da * Fix `emacs-lisp-native-compile-and-load' for (bug#61917)
4a7e657389a * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (...
8a8a994cfab Revert "Fix configuration of webp libraries"
de4277af009 Fix configuration of webp libraries
Diffstat (limited to 'lisp/icomplete.el')
-rw-r--r-- | lisp/icomplete.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index e0b591739ef..49c0c78fe73 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -420,6 +420,16 @@ if that doesn't produce a completion match." "C-." #'icomplete-forward-completions "C-," #'icomplete-backward-completions) +(defun icomplete--fido-ccd () + "Make value for `completion-category-defaults' prioritizing `flex'." + (cl-loop + for (cat . alist) in completion-category-defaults collect + `(,cat . ,(cl-loop + for entry in alist for (prop . val) = entry + if (eq prop 'styles) + collect `(,prop . (flex ,@(delq 'flex val))) + else collect entry)))) + (defun icomplete--fido-mode-setup () "Setup `fido-mode''s minibuffer." (when (and icomplete-mode (icomplete-simple-completing-p)) @@ -431,6 +441,7 @@ if that doesn't produce a completion match." icomplete-scroll (not (null icomplete-vertical-mode)) completion-styles '(flex) completion-flex-nospace nil + completion-category-defaults (icomplete--fido-ccd) completion-ignore-case t read-buffer-completion-ignore-case t read-file-name-completion-ignore-case t))) |