emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/info.el,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/info.el,v
Date: Tue, 22 Apr 2008 19:57:58 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     08/04/22 19:57:58

Index: info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.529
retrieving revision 1.530
diff -u -b -r1.529 -r1.530
--- info.el     22 Apr 2008 15:48:29 -0000      1.529
+++ info.el     22 Apr 2008 19:57:58 -0000      1.530
@@ -1625,20 +1625,8 @@
                                (1- (point)))
                              (point-max)))
          (while (and (not give-up)
-                     (save-match-data
                        (or (null found)
-                           (if backward
-                               (isearch-range-invisible found beg-found)
-                             (isearch-range-invisible beg-found found))
-                           ;; Skip node header line
-                           (and (save-excursion (forward-line -1)
-                                                (looking-at "\^_"))
-                                (forward-line (if backward -1 1)))
-                           ;; Skip Tag Table node
-                           (save-excursion
-                             (and (search-backward "\^_" nil t)
-                                  (looking-at
-                                   "\^_\n\\(Tag Table\\|Local 
Variables\\)"))))))
+                         (not (funcall isearch-success-function beg-found 
found))))
            (let ((search-spaces-regexp
                   (if (or (not isearch-mode) isearch-regexp)
                       Info-search-whitespace-regexp)))
@@ -1717,20 +1705,8 @@
                (setq list (cdr list))
                (setq give-up nil found nil)
                (while (and (not give-up)
-                           (save-match-data
                              (or (null found)
-                                 (if backward
-                                     (isearch-range-invisible found beg-found)
-                                   (isearch-range-invisible beg-found found))
-                                 ;; Skip node header line
-                                 (and (save-excursion (forward-line -1)
-                                                      (looking-at "\^_"))
-                                      (forward-line (if backward -1 1)))
-                                 ;; Skip Tag Table node
-                                 (save-excursion
-                                   (and (search-backward "\^_" nil t)
-                                        (looking-at
-                                         "\^_\n\\(Tag Table\\|Local 
Variables\\)"))))))
+                               (not (funcall isearch-success-function 
beg-found found))))
                  (let ((search-spaces-regexp
                         (if (or (not isearch-mode) isearch-regexp)
                             Info-search-whitespace-regexp)))
@@ -1837,6 +1813,28 @@
 (defun Info-isearch-start ()
   (setq Info-isearch-initial-node nil))
 
+(defun Info-search-success-function (beg-found found)
+  "Skip invisible text, node header line and Tag Table node."
+  (save-match-data
+    (let ((backward (< found beg-found)))
+      (not
+       (or
+       (if backward
+           (or (text-property-not-all found beg-found 'invisible nil)
+               (text-property-not-all found beg-found 'display nil))
+         (or (text-property-not-all beg-found found 'invisible nil)
+             (text-property-not-all beg-found found 'display nil)))
+       ;; Skip node header line
+       (and (save-excursion (forward-line -1)
+                            (looking-at "\^_"))
+            (forward-line (if backward -1 1)))
+       ;; Skip Tag Table node
+       (save-excursion
+         (and (search-backward "\^_" nil t)
+              (looking-at
+               "\^_\n\\(Tag Table\\|Local Variables\\)"))))))))
+
+
 (defun Info-extract-pointer (name &optional errorname)
   "Extract the value of the node-pointer named NAME.
 If there is none, use ERRORNAME in the error message;
@@ -3458,6 +3456,8 @@
        'Info-isearch-wrap)
   (set (make-local-variable 'isearch-push-state-function)
        'Info-isearch-push-state)
+  (set (make-local-variable 'isearch-success-function)
+       'Info-search-success-function)
   (set (make-local-variable 'search-whitespace-regexp)
        Info-search-whitespace-regexp)
   (set (make-local-variable 'revert-buffer-function)




reply via email to

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