emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key bindings for info in other window or frame


From: Matthias Meulien
Subject: Key bindings for info in other window or frame
Date: Wed, 24 Jul 2013 23:28:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Severity: wishlist Tags: patch
Everything is in the subject!

The attached patch defines `info-other-frame' and bind it to `C-x 5 i'. It also bind `info-other-window' to `C-x 4 i'.

I know that `info-other-window' is already bind to `C-h 4 i' but I found it more difficult to remember than the key binding which use the ubiquitous `C-x 4' keymap.

>From cf8d4210743c1c9b06db28e5b5bb5a51f8a190bf Mon Sep 17 00:00:00 2001
From: Matthias Meulien <address@hidden>
Date: Wed, 24 Jul 2013 23:23:44 +0200
Subject: [PATCH] lisp/info.el (info-other-window): Add key binding and other
 frame defun

---
 lisp/info.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lisp/info.el b/lisp/info.el
index 0e0a117..99098e8 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -745,6 +745,7 @@ in `Info-file-supports-index-cookies-list'."
                  (not (member dir (split-string path ":" t)))
                  (push dir Info-directory-list)))))))
 
+;;;###autoload (define-key ctl-x-4-map "i" 'info-other-window)
 ;;;###autoload
 (defun info-other-window (&optional file-or-node buffer)
   "Like `info' but show the Info buffer in another window."
@@ -756,6 +757,18 @@ in `Info-file-supports-index-cookies-list'."
   (info-setup file-or-node
              (switch-to-buffer-other-window (or buffer "*info*"))))
 
+;;;###autoload (define-key ctl-x-5-map "i" 'info-other-frame)
+;;;###autoload
+(defun info-other-frame (&optional file-or-node buffer)
+  "Like `info' but put the Info buffer in another frame."
+  (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-frame (or buffer "*info*"))))
+
 ;;;###autoload (put 'info 'info-file (purecopy "emacs"))
 ;;;###autoload
 (defun info (&optional file-or-node buffer)
-- 
1.8.3.3


Thanks for reading,
--
Matthias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]