aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/info.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 2a929c95d40..8176ce6934d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1052,19 +1052,20 @@ SIG optional fourth argument, controls action on no match
1052 (save-excursion 1052 (save-excursion
1053 (goto-char pos) 1053 (goto-char pos)
1054 (re-search-backward start (max (point-min) (- pos 200)) 'yes) 1054 (re-search-backward start (max (point-min) (- pos 200)) 'yes)
1055 (while (and (re-search-forward all (min (point-max) (+ pos 200)) 'yes) 1055 (let (found)
1056 (not (and (<= (match-beginning 0) pos) 1056 (while (and (re-search-forward all (min (point-max) (+ pos 200)) 'yes)
1057 (> (match-end 0) pos))))) 1057 (not (setq found (and (<= (match-beginning 0) pos)
1058 (if (and (<= (match-beginning 0) pos) 1058 (> (match-end 0) pos))))))
1059 (> (match-end 0) pos)) 1059 (if (and found (<= (match-beginning 0) pos)
1060 (buffer-substring (match-beginning 1) (match-end 1)) 1060 (> (match-end 0) pos))
1061 (cond ((null errorstring) 1061 (buffer-substring (match-beginning 1) (match-end 1))
1062 nil) 1062 (cond ((null errorstring)
1063 ((eq errorstring t) 1063 nil)
1064 (beep) 1064 ((eq errorstring t)
1065 nil) 1065 (beep)
1066 (t 1066 nil)
1067 (error "No %s around position %d" errorstring pos)))))) 1067 (t
1068 (error "No %s around position %d" errorstring pos)))))))
1068 1069
1069(defun Info-follow-nearest-node (click) 1070(defun Info-follow-nearest-node (click)
1070 "\\<Info-mode-map>Follow a node reference near point. 1071 "\\<Info-mode-map>Follow a node reference near point.