diff options
author | Juri Linkov <juri@jurta.org> | 2012-12-02 14:22:32 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-12-02 14:22:32 +0800 |
commit | 3faf4944316a1efc840bd6dffe4315ea30a0f0e8 (patch) | |
tree | c4f1126a896ea5430d057d37269a6ee3fadd1db1 /lisp/info.el | |
parent | 89eb3b0ae7dcb7ae819efd448899103b0d4ee93e (diff) | |
download | emacs-3faf4944316a1efc840bd6dffe4315ea30a0f0e8.tar.gz |
* info.el (info-display-manual): Don't clobber an existing Info buffer.
Fixes: debbugs:10770
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/info.el b/lisp/info.el index b0ef5c6bc4d..f22b39769b1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -5097,7 +5097,9 @@ type returned by `Info-bookmark-make-record', which see." ;;;###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) |