From: Juri Linkov Date: Sun, 18 Sep 2011 20:14:16 +0000 (+0300) Subject: * lisp/info.el (Info-extract-menu-node-name): Check the second match X-Git-Tag: emacs-pretest-24.0.90~93 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d18b513ba78f152ca7c45cf04153c6868972e45e;p=emacs.git * lisp/info.el (Info-extract-menu-node-name): Check the second match for empty string (second test-case of bug#9528). (Info-last-preorder): Let-bind `Info-history' to nil to not add intermediate nodes to the history (first test-case of bug#9528). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdcd33877f9..b820fc24d51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-09-18 Juri Linkov + + * info.el (Info-extract-menu-node-name): Check the second match + for empty string (second test-case of bug#9528). + (Info-last-preorder): Let-bind `Info-history' to nil to not add + intermediate nodes to the history (first test-case of bug#9528). + 2011-09-18 Juri Linkov * info.el (Info-mode-syntax-table): New variable. diff --git a/lisp/info.el b/lisp/info.el index eb45bb0bd2f..e79e4b1195e 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2440,7 +2440,8 @@ Because of ambiguities, this should be concatenated with something like ) (replace-regexp-in-string "[ \n]+" " " - (or (match-string-no-properties 2) + (or (and (not (equal (match-string-no-properties 2) "")) + (match-string-no-properties 2)) ;; If the node name is the menu entry name (using `entry::'). (buffer-substring-no-properties (match-beginning 0) (1- (match-beginning 1))))))) @@ -2765,22 +2766,24 @@ N is the digit argument used to invoke this command." ;; so we can scroll back through it. (goto-char (point-max))) ;; Keep going down, as long as there are nested menu nodes. - (while (Info-no-error - (Info-last-menu-item) - ;; If we go down a menu item, go to the end of the node - ;; so we can scroll back through it. - (goto-char (point-max)))) + (let (Info-history) ; Don't add intermediate nodes to the history. + (while (Info-no-error + (Info-last-menu-item) + ;; If we go down a menu item, go to the end of the node + ;; so we can scroll back through it. + (goto-char (point-max))))) (recenter -1)) ((and (Info-no-error (Info-extract-pointer "prev")) (not (equal (Info-extract-pointer "up") (Info-extract-pointer "prev")))) (Info-no-error (Info-prev)) (goto-char (point-max)) - (while (Info-no-error - (Info-last-menu-item) - ;; If we go down a menu item, go to the end of the node - ;; so we can scroll back through it. - (goto-char (point-max)))) + (let (Info-history) ; Don't add intermediate nodes to the history. + (while (Info-no-error + (Info-last-menu-item) + ;; If we go down a menu item, go to the end of the node + ;; so we can scroll back through it. + (goto-char (point-max))))) (recenter -1)) ((Info-no-error (Info-up t)) (goto-char (point-min))