| Previous: Icicles - Global Filters | Icicles | IciclesIndex | Next: Icicles - Defining Completion for Comint Modes |
This section is for EmacsLisp programmers.
By default, Icicles lets users use basic prefix completion (with ‘TAB’) or apropos completion (with ‘S-TAB’). They can alternatively use other completion methods with ‘TAB’ and ‘S-TAB’:
C-(’ during completion to cycle among ‘TAB’ completion methods.M-(’ to cycle among ‘S-TAB’ completion methods.When you define an Icicles command, you can specify which string-matching functions the command uses during completion:
‘TAB’ by default, then bind ‘icicle-fuzzy-completion-flag’ to non-‘nil’. Users can still use `C-(’ to toggle fuzzy completion off.‘S-TAB’ completion by default, then bind variable ‘icicle-apropos-complete-match-fn’ to that function. Users can still use `M-(’ to cycle among the other matching functions for ‘S-TAB’.You can bind ‘icicle-apropos-complete-match-fn’ to any function that matches strings. You will probably also want to ensure that it is available for `M-(’ cycling, by adding it to ‘icicle-S-TAB-completion-methods-alist’ in a ‘let’ binding. For example, to use matching function ‘my-match’ in ‘my-cmd’, you might do this:
(defun my-cmd ()
"..."
(interactive)
(let ((icicle-apropos-complete-match-fn 'my-match)
(icicle-S-TAB-completion-methods-alist
(cons (cons "mine" 'my-match)
icicle-S-TAB-completion-methods-alist)))
(do-something (completing-read "Choose: " ...) ...)))| Previous: Icicles - Global Filters | Icicles | IciclesIndex | Next: Icicles - Defining Completion for Comint Modes |
DrewsElispLibraries referenced here: Lisp:icicles.el
CategoryCommands CategoryBufferSwitching CategoryCompletion CategoryRegexp CategoryProgrammerUtils CategoryCode