bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive


From: Juri Linkov
Subject: bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive even if case-fold is active
Date: Wed, 10 May 2017 01:10:03 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu)

>>> @@ -1950,7 +1950,12 @@ isearch-highlight-regexp
>>>                           (regexp-quote s))))
>>>                     isearch-string ""))
>>>                   (t (regexp-quote isearch-string)))))
>>> -    (hi-lock-face-buffer regexp (hi-lock-read-face-name)))
>>> +    (hi-lock-face-buffer regexp (hi-lock-read-face-name)
>>> +                         (if (and (eq isearch-case-fold-search t)
>>> +                                  search-upper-case)
>>> +                             (isearch-no-upper-case-p
>>> +                              isearch-string isearch-regexp)
>>> +                           isearch-case-fold-search)))
>>>    (and isearch-recursive-edit (exit-recursive-edit)))
>>
>> If this works reliably, then we could remove that ugly hack
>> from ‘isearch-highlight-regexp’, I mean the one with the comment
>> “Turn isearch-string into a case-insensitive regexp”.
> That's right.  We don't need such trick here anymore.  But this hack
> turned ut to be useful in hi-lock.el.
>
> The new patch, in addition to fix this bug report, it also
> helps with the 5. in bug#22520, that is:
> emacs -Q
> M-s hr t RET RET ; Highlight with regexp "[Tt]"
> M-s hu t RET ; Unhighlight the buffer.

Thanks, could you find more test cases that still don't work?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]