# HG changeset patch # User Juri Linkov # Date 1110593912 0 # Node ID 1bfdd67c03375f4a262cc5c11c17246c9b5884d4 # Parent e2a23a4d59819271997f176a45c54cee9336ac44 (Info-search): Four fixes for backward search. diff -r e2a23a4d5981 -r 1bfdd67c0337 lisp/info.el --- a/lisp/info.el Sat Mar 12 02:18:16 2005 +0000 +++ b/lisp/info.el Sat Mar 12 02:18:32 2005 +0000 @@ -1502,7 +1502,7 @@ ;; Skip node header line (and (save-excursion (forward-line -1) (looking-at "\^_")) - (forward-line 1)) + (forward-line (if backward -1 1))) ;; Skip Tag Table node (save-excursion (and (search-backward "\^_" nil t) @@ -1540,6 +1540,7 @@ (search-forward (concat "\n" osubfile ": ")) ;; Skip that one. (forward-line (if backward 0 1)) + (if backward (forward-char -1)) ;; Make a list of all following subfiles. ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). (while (not (if backward (bobp) (eobp))) @@ -1578,7 +1579,7 @@ ;; Skip node header line (and (save-excursion (forward-line -1) (looking-at "\^_")) - (forward-line 1)) + (forward-line (if backward -1 1))) ;; Skip Tag Table node (save-excursion (and (search-backward "\^_" nil t) @@ -1615,7 +1616,8 @@ ;; Use string-equal, not equal, to ignore text props. (or (and (string-equal onode Info-current-node) (equal ofile Info-current-file)) - (and isearch-mode isearch-wrapped (eq opoint opoint-min)) + (and isearch-mode isearch-wrapped + (eq opoint (if isearch-forward opoint-min opoint-max))) (setq Info-history (cons (list ofile onode opoint) Info-history))))))