* minibuffer.el (completion-table-case-fold): New function for
authorTassilo Horn <tassilo@member.fsf.org>
Sat, 12 Feb 2011 18:30:13 +0000 (19:30 +0100)
committerTassilo Horn <tassilo@member.fsf.org>
Sat, 12 Feb 2011 18:30:13 +0000 (19:30 +0100)
creating a case-insensitive completion table.

lisp/ChangeLog
lisp/minibuffer.el

index 797624b..e1bc8b9 100644 (file)
@@ -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
index 1b42ee1..3c8628c 100644 (file)
@@ -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.