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

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

bug#14427: 24.3.50; Highlight symbol at point


From: Juri Linkov
Subject: bug#14427: 24.3.50; Highlight symbol at point
Date: Tue, 21 May 2013 02:28:21 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

BTW, the current symbol is incorrectly highlighted when
`hi-lock-face-buffer' is called from isearch.  This should be
fixed by this patch:

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2013-05-18 22:46:59 +0000
+++ lisp/isearch.el     2013-05-20 23:27:28 +0000
@@ -1773,7 +1791,10 @@ (defun isearch-highlight-regexp ()
     (isearch-done nil t)
     (isearch-clean-overlays))
   (require 'hi-lock nil t)
-  (let ((string (cond (isearch-regexp isearch-string)
+  (let ((string (cond ((functionp isearch-word)
+                      (funcall isearch-word isearch-string))
+                     (isearch-word (word-search-regexp isearch-string))
+                     (isearch-regexp isearch-string)
                      ((if (and (eq isearch-case-fold-search t)
                                search-upper-case)
                           (isearch-no-upper-case-p

It still can't correctly set `case-fold-search' for hi-lock, but
this can't be improved because hi-lock is based on font-lock
when font-lock is enabled in the buffer, and changing
`font-lock-keywords-case-fold-search' to the same value as
`isearch-case-fold-search' might break font-lock highlighting
for its other default keywords.





reply via email to

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