diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 24 |
2 files changed, 17 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5f518b6fd08..f3b8c285f74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-09-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * minibuffer.el (completion-pcm--pattern->regex): Undo last change. | ||
| 4 | (completion-pcm--all-completions): Move the case-fold-search binding to | ||
| 5 | it also applies to completion-regexp-list (used in all-completions). | ||
| 6 | (completion-pcm--hilit-commonality): Add missing case-fold-search. | ||
| 7 | |||
| 1 | 2008-09-03 Martin Rudalics <rudalics@gmx.at> | 8 | 2008-09-03 Martin Rudalics <rudalics@gmx.at> |
| 2 | 9 | ||
| 3 | * window.el (pop-up-frame-function): Move ... | 10 | * window.el (pop-up-frame-function): Move ... |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 163bebb5028..b64a8d08ae5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1381,17 +1381,12 @@ or a symbol chosen among `any', `star', `point'." | |||
| 1381 | (mapconcat | 1381 | (mapconcat |
| 1382 | (lambda (x) | 1382 | (lambda (x) |
| 1383 | (case x | 1383 | (case x |
| 1384 | ((star any point) | 1384 | ((star any point) |
| 1385 | (if (if (consp group) (memq x group) group) | 1385 | (if (if (consp group) (memq x group) group) |
| 1386 | "\\(.*?\\)" | 1386 | "\\(.*?\\)" ".*?")) |
| 1387 | ".*?")) | 1387 | (t (regexp-quote x)))) |
| 1388 | (t | 1388 | pattern |
| 1389 | (if (and completion-ignore-case | 1389 | "")))) |
| 1390 | (string-match "[[:alpha:]]" x)) | ||
| 1391 | (format "[%s%s]" (downcase x) (upcase x)) | ||
| 1392 | (regexp-quote x))))) | ||
| 1393 | pattern | ||
| 1394 | "")))) | ||
| 1395 | ;; Avoid pathological backtracking. | 1390 | ;; Avoid pathological backtracking. |
| 1396 | (while (string-match "\\.\\*\\?\\(?:\\\\[()]\\)*\\(\\.\\*\\?\\)" re) | 1391 | (while (string-match "\\.\\*\\?\\(?:\\\\[()]\\)*\\(\\.\\*\\?\\)" re) |
| 1397 | (setq re (replace-match "" t t re 1))) | 1392 | (setq re (replace-match "" t t re 1))) |
| @@ -1413,7 +1408,8 @@ PATTERN is as returned by `completion-pcm--string->pattern'." | |||
| 1413 | ;; since all-completions is written in C! | 1408 | ;; since all-completions is written in C! |
| 1414 | (let* (;; Convert search pattern to a standard regular expression. | 1409 | (let* (;; Convert search pattern to a standard regular expression. |
| 1415 | (regex (completion-pcm--pattern->regex pattern)) | 1410 | (regex (completion-pcm--pattern->regex pattern)) |
| 1416 | (completion-regexp-list (cons regex completion-regexp-list)) | 1411 | (case-fold-search completion-ignore-case) |
| 1412 | (completion-regexp-list (cons regex completion-regexp-list)) | ||
| 1417 | (compl (all-completions | 1413 | (compl (all-completions |
| 1418 | (concat prefix (if (stringp (car pattern)) (car pattern) "")) | 1414 | (concat prefix (if (stringp (car pattern)) (car pattern) "")) |
| 1419 | table pred)) | 1415 | table pred)) |
| @@ -1426,8 +1422,7 @@ PATTERN is as returned by `completion-pcm--string->pattern'." | |||
| 1426 | (if (not (functionp table)) | 1422 | (if (not (functionp table)) |
| 1427 | ;; The internal functions already obeyed completion-regexp-list. | 1423 | ;; The internal functions already obeyed completion-regexp-list. |
| 1428 | compl | 1424 | compl |
| 1429 | (let ((case-fold-search completion-ignore-case) | 1425 | (let ((poss ())) |
| 1430 | (poss ())) | ||
| 1431 | (dolist (c compl) | 1426 | (dolist (c compl) |
| 1432 | (when (string-match regex c) (push c poss))) | 1427 | (when (string-match regex c) (push c poss))) |
| 1433 | poss))))) | 1428 | poss))))) |
| @@ -1435,6 +1430,7 @@ PATTERN is as returned by `completion-pcm--string->pattern'." | |||
| 1435 | (defun completion-pcm--hilit-commonality (pattern completions) | 1430 | (defun completion-pcm--hilit-commonality (pattern completions) |
| 1436 | (when completions | 1431 | (when completions |
| 1437 | (let* ((re (completion-pcm--pattern->regex pattern '(point))) | 1432 | (let* ((re (completion-pcm--pattern->regex pattern '(point))) |
| 1433 | (case-fold-search completion-ignore-case) | ||
| 1438 | (last (last completions)) | 1434 | (last (last completions)) |
| 1439 | (base-size (cdr last))) | 1435 | (base-size (cdr last))) |
| 1440 | ;; Remove base-size during mapcar, and add it back later. | 1436 | ;; Remove base-size during mapcar, and add it back later. |