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: @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 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}). 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 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. ** 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 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." (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