emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105831: * lisp/info.el (Info-extract


From: Juri Linkov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105831: * lisp/info.el (Info-extract-menu-node-name): Check the second match
Date: Sun, 18 Sep 2011 23:14:16 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105831
fixes bug(s): http://debbugs.gnu.org/9528
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Sun 2011-09-18 23:14:16 +0300
message:
  * 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).
modified:
  lisp/ChangeLog
  lisp/info.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-18 19:56:12 +0000
+++ b/lisp/ChangeLog    2011-09-18 20:14:16 +0000
@@ -1,5 +1,12 @@
 2011-09-18  Juri Linkov  <address@hidden>
 
+       * 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  <address@hidden>
+
        * info.el (Info-mode-syntax-table): New variable.
        (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table'.  
(Bug#3312)
 

=== modified file 'lisp/info.el'
--- a/lisp/info.el      2011-09-18 19:56:12 +0000
+++ b/lisp/info.el      2011-09-18 20:14:16 +0000
@@ -2440,7 +2440,8 @@
       )
     (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 @@
          ;; 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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]