]> git.eshelyaron.com Git - emacs.git/commitdiff
* isearch.el (isearch-update-post-hook): New hook.
authorMark A. Hershberger <mah@everybody.org>
Thu, 20 May 2010 22:16:19 +0000 (01:16 +0300)
committerJuri Linkov <juri@jurta.org>
Thu, 20 May 2010 22:16:19 +0000 (01:16 +0300)
(isearch-update): Use the new hook.  (Bug#6225)

etc/NEWS
lisp/ChangeLog
lisp/isearch.el

index 1c7d9268e5d0a28bed037133c9b57f4d61fd2320..c5871ebd98ab38c840ff2f719ef1e5efd56c7cca 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -255,6 +255,10 @@ by the Graphic Control Extension of the image.
 
 *** `image-extension-data' is renamed to `image-metadata'.
 
+** Isearch
+
+*** New hook `isearch-update-post-hook' that runs in `isearch-update'.
+
 ** Progress reporters can now "spin".
 The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can
 now be nil, or omitted.  This makes a "non-numeric" reporter.  Each
index b0dbec2f6b2acbeac459adab65dafc39ec0804dd..15dc5d2aa9a9d3f8abe05181ea21990866b6043b 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-20  Mark A. Hershberger  <mah@everybody.org>
+
+       * isearch.el (isearch-update-post-hook): New hook.
+       (isearch-update): Use the new hook.  (Bug#6225)
+
 2010-05-20  Juri Linkov  <juri@jurta.org>
 
        * isearch.el (isearch-mode-map): Bind more keys to isearch-help-map:
index b3d121512c2a0032d939a699a66bf391aa05d08a..c44238ede24d37be8377ffa8ec42b6e6fa13e947 100644 (file)
@@ -156,6 +156,9 @@ command history."
 (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 @@ It is called by the function `isearch-forward' and other related functions."
     (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.