From e2784c87183787f8d5bffb0cf10e08fabe02ff91 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sat, 12 Feb 2011 19:30:13 +0100 Subject: [PATCH] * minibuffer.el (completion-table-case-fold): New function for creating a case-insensitive completion table. --- lisp/ChangeLog | 5 +++++ lisp/minibuffer.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 797624be6fb..e1bc8b94564 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-02-12 Tassilo Horn + + * minibuffer.el (completion-table-case-fold): New function for + creating a case-insensitive completion table. + 2011-02-12 Teodor Zlatanov * net/tramp.el (tramp-default-method): Also check if diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 1b42ee1f2ce..3c8628c9cfa 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -196,6 +196,10 @@ You should give VAR a non-nil `risky-local-variable' property." (setq ,var (,fun))) ,var)))) +(defun completion-table-case-fold (table string pred action) + (let ((completion-ignore-case t)) + (complete-with-action action table string pred))) + (defun completion-table-with-context (prefix table string pred action) ;; TODO: add `suffix' maybe? ;; Notice that `pred' may not be a function in some abusive cases. -- 2.39.5