]> code.delx.au - gnu-emacs/blobdiff - lisp/info.el
Update copyright year to 2015
[gnu-emacs] / lisp / info.el
index 2a8ba9064b2295e742bfb16c90d72189e43005c7..01596619476c3af8271eeef1219e9e881ed1c983 100644 (file)
@@ -1,6 +1,6 @@
 ;; info.el --- Info package for Emacs  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1985-1986, 1992-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-2015 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: help
@@ -4013,7 +4013,6 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
     (define-key map "," 'Info-index-next)
     (define-key map "\177" 'Info-scroll-down)
     (define-key map [mouse-2] 'Info-mouse-follow-nearest-node)
-    (define-key map [down-mouse-2] 'ignore) ;Override potential global binding.
     (define-key map [follow-link] 'mouse-face)
     (define-key map [XF86Back] 'Info-history-back)
     (define-key map [XF86Forward] 'Info-history-forward)
@@ -5278,13 +5277,15 @@ type returned by `Info-bookmark-make-record', which see."
 (defun info-display-manual (manual)
   "Display an Info buffer displaying MANUAL.
 If there is an existing Info buffer for MANUAL, display it.
-Otherwise, visit the manual in a new Info buffer."
+Otherwise, visit the manual in a new Info buffer.  In interactive
+use, a prefix argument directs this command to limit the
+completion alternatives to currently visited manuals."
   (interactive
    (list
     (progn
       (info-initialize)
       (completing-read "Manual name: "
-                      (info--manual-names)
+                      (info--manual-names current-prefix-arg)
                       nil t))))
   (let ((blist (buffer-list))
        (manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
@@ -5303,7 +5304,7 @@ Otherwise, visit the manual in a new Info buffer."
       (info (Info-find-file manual)
            (generate-new-buffer-name "*info*")))))
 
-(defun info--manual-names ()
+(defun info--manual-names (visited-only)
   (let (names)
     (dolist (buffer (buffer-list))
       (with-current-buffer buffer
@@ -5314,11 +5315,12 @@ Otherwise, visit the manual in a new Info buffer."
                    (file-name-nondirectory Info-current-file))
                   names))))
     (delete-dups (append (nreverse names)
-                        (all-completions
-                         ""
-                         (apply-partially 'Info-read-node-name-2
-                                          Info-directory-list
-                                          (mapcar 'car Info-suffix-list)))))))
+                        (when (not visited-only)
+                          (all-completions
+                           ""
+                           (apply-partially 'Info-read-node-name-2
+                                            Info-directory-list
+                                            (mapcar 'car Info-suffix-list))))))))
 
 (provide 'info)