# HG changeset patch # User Richard M. Stallman # Date 830051222 0 # Node ID 60ff6e57ddbd1a32f98cb09642cd10a89cb14159 # Parent df34d8bec5fca9a6f6794fed9c65956332cbc580 (Info-next-reference, Info-prev-reference): Add optional argument RECUR to avoid infinite recursion on malformed nodes. diff -r df34d8bec5fc -r 60ff6e57ddbd lisp/info.el --- a/lisp/info.el Sun Apr 21 01:40:33 1996 +0000 +++ b/lisp/info.el Sun Apr 21 01:47:02 1996 +0000 @@ -1242,7 +1242,7 @@ (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 @@ (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 @@ (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.