]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind 'C-x 4 1' to 'same-window-prefix' and document new commands (bug#41691)
authorJuri Linkov <juri@linkov.net>
Tue, 30 Jun 2020 21:30:18 +0000 (00:30 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 30 Jun 2020 21:30:18 +0000 (00:30 +0300)
* lisp/window.el (ctl-x-4-map): Bind 'C-x 4 1' to 'same-window-prefix'.

* doc/emacs/windows.texi (Pop Up Window): Add 'C-x 4 4' and 'C-x 4 1'.
* doc/emacs/frames.texi (Creating Frames): Add 'C-x 5 5'.
(Tab Bars): Add 'C-x t t'.

doc/emacs/frames.texi
doc/emacs/windows.texi
etc/NEWS
lisp/window.el

index e0eabe38d06c590e77255b340b5931dec62eed73..b99d8ab1453df3de082f6ab863d3a8e8c49ee957 100644 (file)
@@ -439,29 +439,40 @@ buffer to select:
 @kindex C-x 5 2
 @findex make-frame-command
 Create a new frame (@code{make-frame-command}).
+
 @item C-x 5 b @var{bufname} @key{RET}
 Select buffer @var{bufname} in another frame.  This runs
 @code{switch-to-buffer-other-frame}.
+
 @item C-x 5 f @var{filename} @key{RET}
 Visit file @var{filename} and select its buffer in another frame.  This
 runs @code{find-file-other-frame}.  @xref{Visiting}.
+
 @item C-x 5 d @var{directory} @key{RET}
 Select a Dired buffer for directory @var{directory} in another frame.
 This runs @code{dired-other-frame}.  @xref{Dired}.
+
 @item C-x 5 m
 Start composing a mail message in another frame.  This runs
 @code{compose-mail-other-frame}.  It is the other-frame variant of
 @kbd{C-x m}.  @xref{Sending Mail}.
+
 @item C-x 5 .
 Find the definition of an identifier in another frame.  This runs
 @code{xref-find-definitions-other-frame}, the multiple-frame variant
 of @kbd{M-.}.  @xref{Xref}.
+
 @item C-x 5 r @var{filename} @key{RET}
 @kindex C-x 5 r
 @findex find-file-read-only-other-frame
 Visit file @var{filename} read-only, and select its buffer in another
 frame.  This runs @code{find-file-read-only-other-frame}.
 @xref{Visiting}.
+
+@item C-x 5 5
+A more general prefix command affects the buffer displayed by the next
+command invoked immediately after this prefix command.  It requests
+the buffer of the next command to be displayed in another frame.
 @end table
 
   You can control the appearance and behavior of the newly-created
@@ -1316,6 +1327,11 @@ runs @code{find-file-other-tab}.  @xref{Visiting}.
 @item C-x t d @var{directory} @key{RET}
 Select a Dired buffer for directory @var{directory} in another tab.
 This runs @code{dired-other-tab}.  @xref{Dired}.
+
+@item C-x t t
+A more general prefix command affects the buffer displayed by the next
+command invoked immediately after this prefix command.  It requests
+the buffer of the next command to be displayed in another tab.
 @end table
 
 @vindex tab-bar-new-tab-choice
index 4c67660b92de5d5f0350534332c78ede6ec78fd6..bc1dcd7f41972e38047749252c2960c78e18dcd3 100644 (file)
@@ -251,9 +251,19 @@ Mail}), but in another window (@code{compose-mail-other-window}).
 Find the definition of an identifier, similar to @kbd{M-.}
 (@pxref{Xref}), but in another window
 (@code{xref-find-definitions-other-window}).
+
 @item C-x 4 r @var{filename} @key{RET}
 Visit file @var{filename} read-only, and select its buffer in another
 window (@code{find-file-read-only-other-window}).  @xref{Visiting}.
+
+@item C-x 4 4
+A more general prefix command affects the buffer displayed by the next
+command invoked immediately after this prefix command.  It requests
+the buffer of the next command to be displayed in another window.
+
+@item C-x 4 1
+This general prefix command requests the buffer of the next command
+to be displayed in the same window.
 @end table
 
 @node Change Window
index ddc0999c9e885423052c912b56e45ffec4f18ff7..d215f0dacfb426ffb06a69922c8e5dc218168fdd 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -117,15 +117,25 @@ setting the variable 'auto-save-visited-mode' buffer-locally to nil.
 
 ** Windows
 
+*** The key prefix 'C-x 4 1' displays next command buffer in the same window.
+It's bound to the command 'same-window-prefix' that requests the buffer
+of the next command to be displayed in the same window.
+
 *** The key prefix 'C-x 4 4' displays next command buffer in a new window.
+It's bound to the command 'other-window-prefix' that requests the buffer
+of the next command to be displayed in a new window.
 
 ** Frames
 
 *** The key prefix 'C-x 5 5' displays next command buffer in a new frame.
+It's bound to the command 'other-frame-prefix' that requests the buffer
+of the next command to be displayed in a new frame.
 
 ** Tab Bars
 
 *** The key prefix 'C-x t t' displays next command buffer in a new tab.
+It's bound to the command 'other-tab-prefix' that requests the buffer
+of the next command to be displayed in a new tab.
 
 *** The tab bar is frame-local when 'tab-bar-show' is a number.
 Show/hide the tab bar independently for each frame, according to the
index d499f9ab99aed7cf4fe09a1ff90f55e5fcd00860..675aff041b166a707ff34629561582f317287ba4 100644 (file)
@@ -10168,6 +10168,7 @@ displaying that processes's buffer."
 (define-key ctl-x-map "-" 'shrink-window-if-larger-than-buffer)
 (define-key ctl-x-map "+" 'balance-windows)
 (define-key ctl-x-4-map "0" 'kill-buffer-and-window)
+(define-key ctl-x-4-map "1" 'same-window-prefix)
 (define-key ctl-x-4-map "4" 'other-window-prefix)
 
 ;;; window.el ends here