Commit e98ddd6f authored by Juri Linkov's avatar Juri Linkov

Bind 'C-x 4 1' to 'same-window-prefix' and document new commands (bug#41691)

* 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'.
parent bc8089a3
Pipeline #5970 failed with stage
in 90 minutes and 7 seconds
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment