diff options
| author | Chong Yidong | 2008-08-29 19:15:19 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-08-29 19:15:19 +0000 |
| commit | 36bdf1ff3ca1e776bc4be74f10e20bfbdb8d617a (patch) | |
| tree | b4ad5a029e924a9a6a8a05d9f3876eaaef66dc55 | |
| parent | 1d9fad13cec8bb15dbf0b564ba02d88a6ea57491 (diff) | |
| download | emacs-36bdf1ff3ca1e776bc4be74f10e20bfbdb8d617a.tar.gz emacs-36bdf1ff3ca1e776bc4be74f10e20bfbdb8d617a.zip | |
(isearch-highlight-regexp): Fix case of highlighted string.
| -rw-r--r-- | lisp/isearch.el | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 42c213a63dd..3aed19b9ceb 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1393,14 +1393,21 @@ and reads its face argument using `hi-lock-read-face-name'." | |||
| 1393 | (isearch-done) | 1393 | (isearch-done) |
| 1394 | (isearch-clean-overlays) | 1394 | (isearch-clean-overlays) |
| 1395 | (require 'hi-lock nil t) | 1395 | (require 'hi-lock nil t) |
| 1396 | ;; (add-to-history 'hi-lock-regexp-history regexp) | 1396 | (let ((string (cond (isearch-regexp isearch-string) |
| 1397 | (let ((case-fold-search isearch-case-fold-search) | 1397 | ((if (and (eq isearch-case-fold-search t) |
| 1398 | ;; TODO: add `search-upper-case' as in `isearch-occur' | 1398 | search-upper-case) |
| 1399 | ) | 1399 | (isearch-no-upper-case-p |
| 1400 | (hi-lock-face-buffer | 1400 | isearch-string isearch-regexp) |
| 1401 | (hi-lock-regexp-okay | 1401 | isearch-case-fold-search) |
| 1402 | (if isearch-regexp isearch-string (regexp-quote isearch-string))) | 1402 | ;; Turn isearch-string into a case-insensitive |
| 1403 | (hi-lock-read-face-name)))) | 1403 | ;; regexp. |
| 1404 | (replace-regexp-in-string | ||
| 1405 | "[a-z]" | ||
| 1406 | (lambda (m) | ||
| 1407 | (format "[%s%s]" (upcase m) (downcase m))) | ||
| 1408 | isearch-string)) | ||
| 1409 | (t (regexp-quote isearch-string))))) | ||
| 1410 | (hi-lock-face-buffer string (hi-lock-read-face-name)))) | ||
| 1404 | 1411 | ||
| 1405 | 1412 | ||
| 1406 | (defun isearch-delete-char () | 1413 | (defun isearch-delete-char () |