From: Tassilo Horn <tassilo@member.fsf.org>
Date: Sat, 12 Feb 2011 18:30:13 +0000 (+0100)
Subject: * minibuffer.el (completion-table-case-fold): New function for
X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~918
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e2784c87183787f8d5bffb0cf10e08fabe02ff91;p=emacs.git

* minibuffer.el (completion-table-case-fold): New function for
creating a case-insensitive completion table.
---

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  <tassilo@member.fsf.org>
+
+	* minibuffer.el (completion-table-case-fold): New function for
+	creating a case-insensitive completion table.
+
 2011-02-12  Teodor Zlatanov  <tzz@lifelogs.com>
 
 	* 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.