Mercurial > emacs
changeset 15055:60ff6e57ddbd
(Info-next-reference, Info-prev-reference): Add optional
argument RECUR to avoid infinite recursion on malformed nodes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 21 Apr 1996 01:47:02 +0000 |
parents | df34d8bec5fc |
children | 4f2cfe6ee83c |
files | lisp/info.el |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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.