1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-05 20:43:08 +00:00

(Info-next-reference, Info-prev-reference): Add optional

argument RECUR to avoid infinite recursion on malformed nodes.
This commit is contained in:
Richard M. Stallman 1996-04-21 01:47:02 +00:00
parent 8b09046c08
commit 56cda6f5c1

View File

@ -1242,7 +1242,7 @@ previous node or back up to the parent node."
(Info-last-preorder)
(scroll-down))))
(defun Info-next-reference ()
(defun Info-next-reference (&optional recur)
"Move cursor to the next cross-reference or menu item in the node."
(interactive)
(let ((pat "\\*note[ \n\t]*\\([^:]*\\):\\|^\\* .*:")
@ -1257,9 +1257,11 @@ previous node or back up to the parent node."
(error "No cross references in this node")))))
(goto-char (match-beginning 0))
(if (looking-at "\\* Menu:")
(Info-next-reference))))
(if recur
(error "No cross references in this node")
(Info-next-reference t)))))
(defun Info-prev-reference ()
(defun Info-prev-reference (&optional recur)
"Move cursor to the previous cross-reference or menu item in the node."
(interactive)
(let ((pat "\\*note[ \n\t]*\\([^:]*\\):\\|^\\* .*:")
@ -1273,7 +1275,9 @@ previous node or back up to the parent node."
(error "No cross references in this node")))))
(goto-char (match-beginning 0))
(if (looking-at "\\* Menu:")
(Info-prev-reference))))
(if recur
(error "No cross references in this node")
(Info-prev-reference t)))))
(defun Info-index (topic)
"Look up a string in the index for this file.