]> git.eshelyaron.com Git - emacs.git/commitdiff
(completion-pcm--pattern->regex): Undo last change.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 3 Sep 2008 14:09:49 +0000 (14:09 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 3 Sep 2008 14:09:49 +0000 (14:09 +0000)
(completion-pcm--all-completions): Move the case-fold-search binding to
it also applies to completion-regexp-list (used in all-completions).
(completion-pcm--hilit-commonality): Add missing case-fold-search.

lisp/ChangeLog
lisp/minibuffer.el

index 5f518b6fd089bfe5e1a534f82cf3d2eb0346877c..f3b8c285f74628419d2dfe30107aef8310640b3a 100644 (file)
@@ -1,3 +1,10 @@
+2008-09-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuffer.el (completion-pcm--pattern->regex): Undo last change.
+       (completion-pcm--all-completions): Move the case-fold-search binding to
+       it also applies to completion-regexp-list (used in all-completions).
+       (completion-pcm--hilit-commonality): Add missing case-fold-search.
+
 2008-09-03  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (pop-up-frame-function): Move ...
index 163bebb5028a52befa9420d687495983e517133c..b64a8d08ae5bc7a490608dc50933c63ce1f31e0f 100644 (file)
@@ -1381,17 +1381,12 @@ or a symbol chosen among `any', `star', `point'."
           (mapconcat
            (lambda (x)
              (case x
-              ((star any point)
-               (if (if (consp group) (memq x group) group)
-                   "\\(.*?\\)"
-                 ".*?"))
-               (t
-               (if (and completion-ignore-case
-                        (string-match "[[:alpha:]]" x))
-                   (format "[%s%s]" (downcase x) (upcase x))
-                 (regexp-quote x)))))
-          pattern
-          ""))))
+                      ((star any point)
+                       (if (if (consp group) (memq x group) group)
+                                     "\\(.*?\\)" ".*?"))
+               (t (regexp-quote x))))
+           pattern
+                  ""))))
     ;; Avoid pathological backtracking.
     (while (string-match "\\.\\*\\?\\(?:\\\\[()]\\)*\\(\\.\\*\\?\\)" re)
       (setq re (replace-match "" t t re 1)))
@@ -1413,7 +1408,8 @@ PATTERN is as returned by `completion-pcm--string->pattern'."
     ;; since all-completions is written in C!
     (let* (;; Convert search pattern to a standard regular expression.
           (regex (completion-pcm--pattern->regex pattern))
-          (completion-regexp-list (cons regex completion-regexp-list))
+           (case-fold-search completion-ignore-case)
+           (completion-regexp-list (cons regex completion-regexp-list))
           (compl (all-completions
                    (concat prefix (if (stringp (car pattern)) (car pattern) ""))
                   table pred))
@@ -1426,8 +1422,7 @@ PATTERN is as returned by `completion-pcm--string->pattern'."
       (if (not (functionp table))
          ;; The internal functions already obeyed completion-regexp-list.
          compl
-       (let ((case-fold-search completion-ignore-case)
-              (poss ()))
+       (let ((poss ()))
          (dolist (c compl)
            (when (string-match regex c) (push c poss)))
          poss)))))
@@ -1435,6 +1430,7 @@ PATTERN is as returned by `completion-pcm--string->pattern'."
 (defun completion-pcm--hilit-commonality (pattern completions)
   (when completions
     (let* ((re (completion-pcm--pattern->regex pattern '(point)))
+           (case-fold-search completion-ignore-case)
            (last (last completions))
            (base-size (cdr last)))
       ;; Remove base-size during mapcar, and add it back later.