Mercurial > emacs
changeset 97959:e5dd978be1f3
(isearch-highlight-regexp): Fix last change, quoting non-alphabetical
characters properly.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 03 Sep 2008 00:01:25 +0000 |
parents | dae412744e36 |
children | f0549c923102 |
files | lisp/isearch.el |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/isearch.el Wed Sep 03 00:01:10 2008 +0000 +++ b/lisp/isearch.el Wed Sep 03 00:01:25 2008 +0000 @@ -1401,11 +1401,13 @@ isearch-case-fold-search) ;; Turn isearch-string into a case-insensitive ;; regexp. - (replace-regexp-in-string - "[a-z]" - (lambda (m) - (format "[%s%s]" (upcase m) (downcase m))) - isearch-string)) + (mapconcat + (lambda (c) + (let ((s (string c))) + (if (string-match "[[:alpha:]]" s) + (format "[%s%s]" (upcase s) (downcase s)) + (regexp-quote s)))) + isearch-string "")) (t (regexp-quote isearch-string))))) (hi-lock-face-buffer string (hi-lock-read-face-name))))