Merge from emacs-23; up to 2012-01-19T07:15:48Z!rgm@gnu.org.
[bpt/emacs.git] / lisp / info.el
index 4f2f33d..a8cb141 100644 (file)
@@ -1,6 +1,6 @@
 ;; info.el --- info package for Emacs
 
-;; Copyright (C) 1985-1986, 1992-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-2012  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: help
@@ -1769,12 +1769,14 @@ If DIRECTION is `backward', search in the reverse direction."
       ;; If no subfiles, give error now.
       (if give-up
          (if (null Info-current-subfile)
-             (let ((search-spaces-regexp
-                    (if (or (not isearch-mode) isearch-regexp)
-                        Info-search-whitespace-regexp)))
-               (if backward
-                   (re-search-backward regexp)
-                 (re-search-forward regexp)))
+             (if isearch-mode
+                 (signal 'search-failed (list regexp "end of manual"))
+               (let ((search-spaces-regexp
+                      (if (or (not isearch-mode) isearch-regexp)
+                          Info-search-whitespace-regexp)))
+                 (if backward
+                     (re-search-backward regexp)
+                   (re-search-forward regexp))))
            (setq found nil)))
 
       (if (and bound (not found))
@@ -1845,7 +1847,7 @@ If DIRECTION is `backward', search in the reverse direction."
              (if found
                  (message "")
                (signal 'search-failed (if isearch-mode
-                                          (list regexp "end of the manual")
+                                          (list regexp "end of manual")
                                         (list regexp)))))
          (if (not found)
              (progn (Info-read-subfile osubfile)
@@ -2249,7 +2251,7 @@ Table of contents is created from the tree structure of menus."
                              (match-string-no-properties 1)))
                 (section "Top")
                 menu-items)
-           (when (string-match "(" upnode) (setq upnode nil))
+           (when (and upnode (string-match "(" upnode)) (setq upnode nil))
             (when (and (not (Info-index-node nodename file))
                        (re-search-forward "^\\* Menu:" bound t))
               (forward-line 1)
@@ -3240,7 +3242,7 @@ search results."
        (Info-index topic)
        (push (cons (cons Info-current-file topic) Info-index-alternatives)
              Info-virtual-index-nodes)
-       ;; Clean up unneccessary side-effects of `Info-index'.
+       ;; Clean up unnecessary side-effects of `Info-index'.
        (setq Info-history-list ohist-list)
        (Info-goto-node orignode)
        (message "")))
@@ -3704,7 +3706,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
     (define-key map "b" 'beginning-of-buffer)
     (put 'beginning-of-buffer :advertised-binding "b")
     (define-key map "d" 'Info-directory)
-    (define-key map "e" 'Info-edit)
+    (define-key map "e" 'end-of-buffer)
     (define-key map "f" 'Info-follow-reference)
     (define-key map "g" 'Info-goto-node)
     (define-key map "h" 'Info-help)