From 1e0726398dd27532178fd0fb491872e7e2be396c Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Thu, 27 Jun 2013 11:20:04 +0200 Subject: [PATCH] * info.el (Info-try-follow-nearest-node): Move search for footnote above search for node name to prevent missing a footnote. Fixes: debbugs:14717 --- lisp/ChangeLog | 5 +++++ lisp/info.el | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c36162b017..c8b213b6529 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -13,6 +13,11 @@ * net/shr.el (add-face-text-property): Removed compat definition. +2013-06-27 Stephen Berman + + * info.el (Info-try-follow-nearest-node): Move search for footnote + above search for node name to prevent missing a footnote (bug#14717). + 2013-06-27 Stephen Berman * obsolete/otodo-mode.el: Add obsolescence info to file header. diff --git a/lisp/info.el b/lisp/info.el index 9dc312fc697..f9851a0c1e8 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3870,23 +3870,6 @@ If FORK is non-nil, it is passed to `Info-goto-node'." ((setq node (Info-get-token (point) "\\*note[ \n\t]+" "\\*note[ \n\t]+\\([^:]*\\):\\(:\\|[ \n\t]*(\\)?")) (Info-follow-reference node fork)) - ;; menu item: node name - ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::")) - (Info-goto-node node fork)) - ;; menu item: node name or index entry - ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") - (beginning-of-line) - (forward-char 2) - (setq node (Info-extract-menu-node-name nil (Info-index-node))) - (Info-goto-node node fork)) - ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) - (Info-goto-node node fork)) - ((setq node (Info-get-token (point) "Next: " "Next: \\([^,\n\t]*\\)")) - (Info-goto-node node fork)) - ((setq node (Info-get-token (point) "File: " "File: \\([^,\n\t]*\\)")) - (Info-goto-node "Top" fork)) - ((setq node (Info-get-token (point) "Prev: " "Prev: \\([^,\n\t]*\\)")) - (Info-goto-node node fork)) ;; footnote ((setq node (Info-get-token (point) "(" "\\(([0-9]+)\\)")) (let ((old-point (point)) new-point) @@ -3904,7 +3887,24 @@ If FORK is non-nil, it is passed to `Info-goto-node'." (progn (goto-char new-point) (setq node t)) - (setq node nil))))) + (setq node nil)))) + ;; menu item: node name + ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::")) + (Info-goto-node node fork)) + ;; menu item: node name or index entry + ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") + (beginning-of-line) + (forward-char 2) + (setq node (Info-extract-menu-node-name nil (Info-index-node))) + (Info-goto-node node fork)) + ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) + (Info-goto-node node fork)) + ((setq node (Info-get-token (point) "Next: " "Next: \\([^,\n\t]*\\)")) + (Info-goto-node node fork)) + ((setq node (Info-get-token (point) "File: " "File: \\([^,\n\t]*\\)")) + (Info-goto-node "Top" fork)) + ((setq node (Info-get-token (point) "Prev: " "Prev: \\([^,\n\t]*\\)")) + (Info-goto-node node fork))) node)) (defun Info-mouse-follow-link (click) -- 2.39.2