diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-28 18:00:16 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-28 18:00:16 +0100 |
| commit | dcb5a139c4372eea32f33f03f0714898864dea79 (patch) | |
| tree | 0e723b7cfa5b03808c4ba7c527b8572730a8438d | |
| parent | c1f7fa746bc4d09ab10cede478e22a8a7c13c4f7 (diff) | |
Add cape-capf-with-case-fold
| -rw-r--r-- | README.org | 1 | ||||
| -rw-r--r-- | cape.el | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -161,3 +161,4 @@ achieve a similarly refreshing strategy. - ~cape-interactive-capf~: Create a Capf which can be called interactively. - ~cape-capf-with-properties~: Add completion properties to a Capf. - ~cape-capf-with-predicate~: Add candidate predicate to a Capf. +- ~cape-capf-with-case-fold~: Create a Capf which is case insensitive. @@ -861,6 +861,14 @@ The PREDICATE is passed the candidate symbol or string." `(,beg ,end ,(cape--silent-table table) ,@plist))))) ;;;###autoload +(defun cape-capf-with-case-fold (capf) + "Create a new CAPF which is case insensitive." + (lambda () + (pcase (funcall capf) + (`(,beg ,end ,table . ,plist) + `(,beg ,end ,(completion-table-case-fold table) ,@plist))))) + +;;;###autoload (defun cape-noninterruptible-capf (capf) "Create a new CAPF which is non-interruptible silent by input." (lambda () |
