Commit 36bdf1ff authored by Chong Yidong's avatar Chong Yidong
Browse files

(isearch-highlight-regexp): Fix case of highlighted string.

parent 1d9fad13
......@@ -1393,14 +1393,21 @@ and reads its face argument using `hi-lock-read-face-name'."
(require 'hi-lock nil t)
;; (add-to-history 'hi-lock-regexp-history regexp)
(let ((case-fold-search isearch-case-fold-search)
;; TODO: add `search-upper-case' as in `isearch-occur'
(if isearch-regexp isearch-string (regexp-quote isearch-string)))
(let ((string (cond (isearch-regexp isearch-string)
((if (and (eq isearch-case-fold-search t)
isearch-string isearch-regexp)
;; Turn isearch-string into a case-insensitive
;; regexp.
(lambda (m)
(format "[%s%s]" (upcase m) (downcase m)))
(t (regexp-quote isearch-string)))))
(hi-lock-face-buffer string (hi-lock-read-face-name))))
(defun isearch-delete-char ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment