* info.el (info-display-manual): Don't clobber an existing Info buffer.
authorJuri Linkov <juri@jurta.org>
Sun, 2 Dec 2012 06:22:32 +0000 (14:22 +0800)
committerChong Yidong <cyd@gnu.org>
Sun, 2 Dec 2012 06:22:32 +0000 (14:22 +0800)
Fixes: debbugs:10770

lisp/ChangeLog
lisp/info.el

index ec77915..5175697 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-02  Juri Linkov  <juri@jurta.org>
+
+       * info.el (info-display-manual): Don't clobber an existing Info
+       buffer (Bug#10770).
+
 2012-12-01  Yuya Nishihara  <yuya@tcha.org>  (tiny change)
 
        * vc/vc-hooks.el (vc-find-file-hook): Expand buffer-file-truename
index b0ef5c6..f22b397 100644 (file)
@@ -5097,7 +5097,9 @@ type returned by `Info-bookmark-make-record', which see."
 \f
 ;;;###autoload
 (defun info-display-manual (manual)
-  "Go to Info buffer that displays MANUAL, creating it if none already exists."
+  "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."
   (interactive "sManual name: ")
   (let ((blist (buffer-list))
        (manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
@@ -5113,7 +5115,8 @@ type returned by `Info-bookmark-make-record', which see."
     (if found
        (switch-to-buffer found)
       (info-initialize)
-      (info (Info-find-file manual)))))
+      (info (Info-find-file manual)
+           (generate-new-buffer-name "*info*")))))
 
 (provide 'info)