From 761231d1d2832a93cffad5cbf33b54fbe8333fd7 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Sat, 29 Dec 2012 14:14:00 +0800 Subject: [PATCH] * info.el (info-other-window): New arg, for consistency with info. --- lisp/ChangeLog | 4 ++++ lisp/info.el | 17 +++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1083dc5513..29d8462c78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-29 Damien Cassou + + * info.el (info-other-window): + 2012-12-28 Martin Rudalics * mail/rmail.el (rmail-maybe-display-summary): Rewrite diff --git a/lisp/info.el b/lisp/info.el index 19f9212f88..07d5c66201 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -746,11 +746,15 @@ in `Info-file-supports-index-cookies-list'." (push dir Info-directory-list))))))) ;;;###autoload -(defun info-other-window (&optional file-or-node) +(defun info-other-window (&optional file-or-node buffer) "Like `info' but show the Info buffer in another window." - (interactive (if current-prefix-arg - (list (read-file-name "Info file name: " nil nil t)))) - (info-setup file-or-node (switch-to-buffer-other-window "*info*"))) + (interactive (list + (if (and current-prefix-arg (not (numberp current-prefix-arg))) + (read-file-name "Info file name: " nil nil t)) + (if (numberp current-prefix-arg) + (format "*info*<%s>" current-prefix-arg)))) + (info-setup file-or-node + (switch-to-buffer-other-window (or buffer "*info*")))) ;;;###autoload (put 'info 'info-file (purecopy "emacs")) ;;;###autoload @@ -767,8 +771,9 @@ with the top-level Info directory. In interactive use, a non-numeric prefix argument directs this command to read a file name from the minibuffer. -A numeric prefix argument selects an Info buffer with the prefix number -appended to the Info buffer name. + +A numeric prefix argument N selects an Info buffer named +\"*info*<%s>\". The search path for Info files is in the variable `Info-directory-list'. The top-level Info directory is made by combining all the files named `dir' -- 2.20.1