diff options
| author | Juri Linkov | 2020-07-01 00:30:18 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-07-01 00:30:18 +0300 |
| commit | e98ddd6fc1626a7417a76a4ce51c4591731d1c26 (patch) | |
| tree | 27ef8cb8c7494a1813d2043dde429b481c3edd8f | |
| parent | bc8089a3fa11161428c51439fd3b26fd6583345d (diff) | |
| download | emacs-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.texi | 16 | ||||
| -rw-r--r-- | doc/emacs/windows.texi | 10 | ||||
| -rw-r--r-- | etc/NEWS | 10 | ||||
| -rw-r--r-- | lisp/window.el | 1 |
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 |
| 441 | Create a new frame (@code{make-frame-command}). | 441 | Create 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} |
| 443 | Select buffer @var{bufname} in another frame. This runs | 444 | Select 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} |
| 446 | Visit file @var{filename} and select its buffer in another frame. This | 448 | Visit file @var{filename} and select its buffer in another frame. This |
| 447 | runs @code{find-file-other-frame}. @xref{Visiting}. | 449 | runs @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} |
| 449 | Select a Dired buffer for directory @var{directory} in another frame. | 452 | Select a Dired buffer for directory @var{directory} in another frame. |
| 450 | This runs @code{dired-other-frame}. @xref{Dired}. | 453 | This runs @code{dired-other-frame}. @xref{Dired}. |
| 454 | |||
| 451 | @item C-x 5 m | 455 | @item C-x 5 m |
| 452 | Start composing a mail message in another frame. This runs | 456 | Start 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 . |
| 456 | Find the definition of an identifier in another frame. This runs | 461 | Find 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 |
| 458 | of @kbd{M-.}. @xref{Xref}. | 463 | of @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 |
| 462 | Visit file @var{filename} read-only, and select its buffer in another | 468 | Visit file @var{filename} read-only, and select its buffer in another |
| 463 | frame. This runs @code{find-file-read-only-other-frame}. | 469 | frame. This runs @code{find-file-read-only-other-frame}. |
| 464 | @xref{Visiting}. | 470 | @xref{Visiting}. |
| 471 | |||
| 472 | @item C-x 5 5 | ||
| 473 | A more general prefix command affects the buffer displayed by the next | ||
| 474 | command invoked immediately after this prefix command. It requests | ||
| 475 | the 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} |
| 1317 | Select a Dired buffer for directory @var{directory} in another tab. | 1328 | Select a Dired buffer for directory @var{directory} in another tab. |
| 1318 | This runs @code{dired-other-tab}. @xref{Dired}. | 1329 | This runs @code{dired-other-tab}. @xref{Dired}. |
| 1330 | |||
| 1331 | @item C-x t t | ||
| 1332 | A more general prefix command affects the buffer displayed by the next | ||
| 1333 | command invoked immediately after this prefix command. It requests | ||
| 1334 | the 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}). | |||
| 251 | Find the definition of an identifier, similar to @kbd{M-.} | 251 | Find 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} |
| 255 | Visit file @var{filename} read-only, and select its buffer in another | 256 | Visit file @var{filename} read-only, and select its buffer in another |
| 256 | window (@code{find-file-read-only-other-window}). @xref{Visiting}. | 257 | window (@code{find-file-read-only-other-window}). @xref{Visiting}. |
| 258 | |||
| 259 | @item C-x 4 4 | ||
| 260 | A more general prefix command affects the buffer displayed by the next | ||
| 261 | command invoked immediately after this prefix command. It requests | ||
| 262 | the buffer of the next command to be displayed in another window. | ||
| 263 | |||
| 264 | @item C-x 4 1 | ||
| 265 | This general prefix command requests the buffer of the next command | ||
| 266 | to be displayed in the same window. | ||
| 257 | @end table | 267 | @end table |
| 258 | 268 | ||
| 259 | @node Change Window | 269 | @node Change Window |
| @@ -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. | ||
| 121 | It's bound to the command 'same-window-prefix' that requests the buffer | ||
| 122 | of 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. |
| 125 | It's bound to the command 'other-window-prefix' that requests the buffer | ||
| 126 | of 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. |
| 131 | It's bound to the command 'other-frame-prefix' that requests the buffer | ||
| 132 | of 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. |
| 137 | It's bound to the command 'other-tab-prefix' that requests the buffer | ||
| 138 | of 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. |
| 131 | Show/hide the tab bar independently for each frame, according to the | 141 | Show/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 |