Skip to content

Instantly share code, notes, and snippets.

@mechairoi
Created January 3, 2011 07:05
Show Gist options
  • Save mechairoi/763198 to your computer and use it in GitHub Desktop.
Save mechairoi/763198 to your computer and use it in GitHub Desktop.
nice-isearch-highlight.el
;; override isearch.el
(lexical-let
((original-function (symbol-function 'isearch-lazy-highlight-update)))
(defun isearch-lazy-highlight-update ()
(mapc (lambda (window)
(save-selected-window
(select-window window)
(let ((isearch-lazy-highlight-window (selected-window))
(isearch-lazy-highlight-window-start (window-start))
(isearch-lazy-highlight-window-end (window-end))
(isearch-lazy-highlight-start (point))
(isearch-lazy-highlight-end (point))
(isearch-lazy-highlight-wrapped nil))
(when isearch-lazy-highlight-timer
(cancel-timer isearch-lazy-highlight-timer))
(funcall original-function))))
(window-list))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment