diff lisp/isearch.el @ 108719:bd94528648ad

* isearch.el (isearch-update-post-hook): New hook. (isearch-update): Use the new hook. (Bug#6225)
author Juri Linkov <juri@jurta.org>
date Fri, 21 May 2010 01:16:19 +0300
parents 27118d0de280
children 762db3570fa8
line wrap: on
line diff
--- a/lisp/isearch.el	Fri May 21 01:01:57 2010 +0300
+++ b/lisp/isearch.el	Fri May 21 01:16:19 2010 +0300
@@ -156,6 +156,9 @@
 (defvar isearch-mode-hook nil
   "Function(s) to call after starting up an incremental search.")
 
+(defvar isearch-update-post-hook nil
+  "Function(s) to call after isearch has found matches in the buffer.")
+
 (defvar isearch-mode-end-hook nil
   "Function(s) to call after terminating an incremental search.
 When these functions are called, `isearch-mode-end-hook-quit'
@@ -870,7 +873,8 @@
     (isearch-lazy-highlight-new-loop))
   ;; We must prevent the point moving to the end of composition when a
   ;; part of the composition has just been searched.
-  (setq disable-point-adjustment t))
+  (setq disable-point-adjustment t)
+  (run-hooks 'isearch-update-post-hook))
 
 (defun isearch-done (&optional nopush edit)
   "Exit Isearch mode.