emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e98ddd6: Bind 'C-x 4 1' to 'same-window-prefix' and document new


From: Juri Linkov
Subject: master e98ddd6: Bind 'C-x 4 1' to 'same-window-prefix' and document new commands (bug#41691)
Date: Tue, 30 Jun 2020 17:30:30 -0400 (EDT)

branch: master
commit e98ddd6fc1626a7417a76a4ce51c4591731d1c26
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    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'.
---
 doc/emacs/frames.texi  | 16 ++++++++++++++++
 doc/emacs/windows.texi | 10 ++++++++++
 etc/NEWS               | 10 ++++++++++
 lisp/window.el         |  1 +
 4 files changed, 37 insertions(+)

diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index e0eabe3..b99d8ab 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 4c67660..bc1dcd7 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 ddc0999..d215f0d 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 d499f9a..675aff0 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]