aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2020-07-01 00:30:18 +0300
committerJuri Linkov2020-07-01 00:30:18 +0300
commite98ddd6fc1626a7417a76a4ce51c4591731d1c26 (patch)
tree27ef8cb8c7494a1813d2043dde429b481c3edd8f
parentbc8089a3fa11161428c51439fd3b26fd6583345d (diff)
downloademacs-e98ddd6fc1626a7417a76a4ce51c4591731d1c26.tar.gz
emacs-e98ddd6fc1626a7417a76a4ce51c4591731d1c26.zip
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'.
-rw-r--r--doc/emacs/frames.texi16
-rw-r--r--doc/emacs/windows.texi10
-rw-r--r--etc/NEWS10
-rw-r--r--lisp/window.el1
4 files changed, 37 insertions, 0 deletions
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index e0eabe38d06..b99d8ab1453 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -439,29 +439,40 @@ buffer to select:
439@kindex C-x 5 2 439@kindex C-x 5 2
440@findex make-frame-command 440@findex make-frame-command
441Create a new frame (@code{make-frame-command}). 441Create a new frame (@code{make-frame-command}).
442
442@item C-x 5 b @var{bufname} @key{RET} 443@item C-x 5 b @var{bufname} @key{RET}
443Select buffer @var{bufname} in another frame. This runs 444Select buffer @var{bufname} in another frame. This runs
444@code{switch-to-buffer-other-frame}. 445@code{switch-to-buffer-other-frame}.
446
445@item C-x 5 f @var{filename} @key{RET} 447@item C-x 5 f @var{filename} @key{RET}
446Visit file @var{filename} and select its buffer in another frame. This 448Visit file @var{filename} and select its buffer in another frame. This
447runs @code{find-file-other-frame}. @xref{Visiting}. 449runs @code{find-file-other-frame}. @xref{Visiting}.
450
448@item C-x 5 d @var{directory} @key{RET} 451@item C-x 5 d @var{directory} @key{RET}
449Select a Dired buffer for directory @var{directory} in another frame. 452Select a Dired buffer for directory @var{directory} in another frame.
450This runs @code{dired-other-frame}. @xref{Dired}. 453This runs @code{dired-other-frame}. @xref{Dired}.
454
451@item C-x 5 m 455@item C-x 5 m
452Start composing a mail message in another frame. This runs 456Start composing a mail message in another frame. This runs
453@code{compose-mail-other-frame}. It is the other-frame variant of 457@code{compose-mail-other-frame}. It is the other-frame variant of
454@kbd{C-x m}. @xref{Sending Mail}. 458@kbd{C-x m}. @xref{Sending Mail}.
459
455@item C-x 5 . 460@item C-x 5 .
456Find the definition of an identifier in another frame. This runs 461Find the definition of an identifier in another frame. This runs
457@code{xref-find-definitions-other-frame}, the multiple-frame variant 462@code{xref-find-definitions-other-frame}, the multiple-frame variant
458of @kbd{M-.}. @xref{Xref}. 463of @kbd{M-.}. @xref{Xref}.
464
459@item C-x 5 r @var{filename} @key{RET} 465@item C-x 5 r @var{filename} @key{RET}
460@kindex C-x 5 r 466@kindex C-x 5 r
461@findex find-file-read-only-other-frame 467@findex find-file-read-only-other-frame
462Visit file @var{filename} read-only, and select its buffer in another 468Visit file @var{filename} read-only, and select its buffer in another
463frame. This runs @code{find-file-read-only-other-frame}. 469frame. This runs @code{find-file-read-only-other-frame}.
464@xref{Visiting}. 470@xref{Visiting}.
471
472@item C-x 5 5
473A more general prefix command affects the buffer displayed by the next
474command invoked immediately after this prefix command. It requests
475the buffer of the next command to be displayed in another frame.
465@end table 476@end table
466 477
467 You can control the appearance and behavior of the newly-created 478 You can control the appearance and behavior of the newly-created
@@ -1316,6 +1327,11 @@ runs @code{find-file-other-tab}. @xref{Visiting}.
1316@item C-x t d @var{directory} @key{RET} 1327@item C-x t d @var{directory} @key{RET}
1317Select a Dired buffer for directory @var{directory} in another tab. 1328Select a Dired buffer for directory @var{directory} in another tab.
1318This runs @code{dired-other-tab}. @xref{Dired}. 1329This runs @code{dired-other-tab}. @xref{Dired}.
1330
1331@item C-x t t
1332A more general prefix command affects the buffer displayed by the next
1333command invoked immediately after this prefix command. It requests
1334the buffer of the next command to be displayed in another tab.
1319@end table 1335@end table
1320 1336
1321@vindex tab-bar-new-tab-choice 1337@vindex tab-bar-new-tab-choice
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 4c67660b92d..bc1dcd7f419 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -251,9 +251,19 @@ Mail}), but in another window (@code{compose-mail-other-window}).
251Find the definition of an identifier, similar to @kbd{M-.} 251Find the definition of an identifier, similar to @kbd{M-.}
252(@pxref{Xref}), but in another window 252(@pxref{Xref}), but in another window
253(@code{xref-find-definitions-other-window}). 253(@code{xref-find-definitions-other-window}).
254
254@item C-x 4 r @var{filename} @key{RET} 255@item C-x 4 r @var{filename} @key{RET}
255Visit file @var{filename} read-only, and select its buffer in another 256Visit file @var{filename} read-only, and select its buffer in another
256window (@code{find-file-read-only-other-window}). @xref{Visiting}. 257window (@code{find-file-read-only-other-window}). @xref{Visiting}.
258
259@item C-x 4 4
260A more general prefix command affects the buffer displayed by the next
261command invoked immediately after this prefix command. It requests
262the buffer of the next command to be displayed in another window.
263
264@item C-x 4 1
265This general prefix command requests the buffer of the next command
266to be displayed in the same window.
257@end table 267@end table
258 268
259@node Change Window 269@node Change Window
diff --git a/etc/NEWS b/etc/NEWS
index ddc0999c9e8..d215f0dacfb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -117,15 +117,25 @@ setting the variable 'auto-save-visited-mode' buffer-locally to nil.
117 117
118** Windows 118** Windows
119 119
120*** The key prefix 'C-x 4 1' displays next command buffer in the same window.
121It's bound to the command 'same-window-prefix' that requests the buffer
122of the next command to be displayed in the same window.
123
120*** The key prefix 'C-x 4 4' displays next command buffer in a new window. 124*** The key prefix 'C-x 4 4' displays next command buffer in a new window.
125It's bound to the command 'other-window-prefix' that requests the buffer
126of the next command to be displayed in a new window.
121 127
122** Frames 128** Frames
123 129
124*** The key prefix 'C-x 5 5' displays next command buffer in a new frame. 130*** The key prefix 'C-x 5 5' displays next command buffer in a new frame.
131It's bound to the command 'other-frame-prefix' that requests the buffer
132of the next command to be displayed in a new frame.
125 133
126** Tab Bars 134** Tab Bars
127 135
128*** The key prefix 'C-x t t' displays next command buffer in a new tab. 136*** The key prefix 'C-x t t' displays next command buffer in a new tab.
137It's bound to the command 'other-tab-prefix' that requests the buffer
138of the next command to be displayed in a new tab.
129 139
130*** The tab bar is frame-local when 'tab-bar-show' is a number. 140*** The tab bar is frame-local when 'tab-bar-show' is a number.
131Show/hide the tab bar independently for each frame, according to the 141Show/hide the tab bar independently for each frame, according to the
diff --git a/lisp/window.el b/lisp/window.el
index d499f9ab99a..675aff041b1 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10168,6 +10168,7 @@ displaying that processes's buffer."
10168(define-key ctl-x-map "-" 'shrink-window-if-larger-than-buffer) 10168(define-key ctl-x-map "-" 'shrink-window-if-larger-than-buffer)
10169(define-key ctl-x-map "+" 'balance-windows) 10169(define-key ctl-x-map "+" 'balance-windows)
10170(define-key ctl-x-4-map "0" 'kill-buffer-and-window) 10170(define-key ctl-x-4-map "0" 'kill-buffer-and-window)
10171(define-key ctl-x-4-map "1" 'same-window-prefix)
10171(define-key ctl-x-4-map "4" 'other-window-prefix) 10172(define-key ctl-x-4-map "4" 'other-window-prefix)
10172 10173
10173;;; window.el ends here 10174;;; window.el ends here