# HG changeset patch # User Chong Yidong # Date 1220400085 0 # Node ID e5dd978be1f34e2bf446570b9f3ef8eaca959e63 # Parent dae412744e362265c731f6b25f0f28a6c75c77ff (isearch-highlight-regexp): Fix last change, quoting non-alphabetical characters properly. diff -r dae412744e36 -r e5dd978be1f3 lisp/isearch.el --- 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))))