From: Juri Linkov Date: Sun, 6 Oct 2019 18:47:24 +0000 (+0300) Subject: Don't bind 'C-x 6' to '2C-mode-map' globally by default. X-Git-Tag: emacs-27.0.90~1253 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29db34e3e0cd5be78b7ab4604050c0ba05835414;p=emacs.git Don't bind 'C-x 6' to '2C-mode-map' globally by default. * lisp/textmodes/two-column.el: Don't autoload global setting of "\C-x6" to 2C-command. * lisp/ldefs-boot.el: Update to remove setting "\C-x6" to 2C-command. * doc/emacs/commands.texi (Keys): * doc/emacs/text.texi (Two-Column): * doc/lispref/keymaps.texi (Prefix Keys): * doc/lispref/maps.texi (Standard Keymaps): Unbind 'C-x 6' from '2C-mode-map'. --- diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index 4773d7675bd..17e0d20f358 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi @@ -118,13 +118,12 @@ C-k} is two key sequences, not one. By default, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, @kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x n}, @kbd{C-x r}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x 6}, -@key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are -aliases for @kbd{C-h} and @kbd{C-x 6}.) This list is not cast in -stone; if you customize Emacs, you can make new prefix keys. You -could even eliminate some of the standard ones, though this is not -recommended for most users; for example, if you remove the prefix -definition of @kbd{C-x 4}, then @kbd{C-x 4 C-f} becomes an invalid key -sequence. @xref{Key Bindings}. +@key{ESC}, @kbd{M-g}, @kbd{M-o} and @key{F2}. (@key{F1} is an alias +for @kbd{C-h}.) This list is not cast in stone; if you customize +Emacs, you can make new prefix keys. You could even eliminate some of +the standard ones, though this is not recommended for most users; for +example, if you remove the prefix definition of @kbd{C-x 4}, then +@kbd{C-x 4 C-f} becomes an invalid key sequence. @xref{Key Bindings}. Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key displays a list of the commands starting with that prefix. The sole diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 974f79d5232..a837b6580dd 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -2870,9 +2870,8 @@ of text. It uses two side-by-side windows, each showing its own buffer. There are three ways to enter two-column mode: @table @asis -@item @kbd{@key{F2} 2} or @kbd{C-x 6 2} +@item @kbd{@key{F2} 2} @kindex F2 2 -@kindex C-x 6 2 @findex 2C-two-columns Enter two-column mode with the current buffer on the left, and on the right, a buffer whose name is based on the current buffer's name @@ -2883,9 +2882,8 @@ changed. This command is appropriate when the current buffer is empty or contains just one column and you want to add another column. -@item @kbd{@key{F2} s} or @kbd{C-x 6 s} +@item @kbd{@key{F2} s} @kindex F2 s -@kindex C-x 6 s @findex 2C-split Split the current buffer, which contains two-column text, into two buffers, and display them side by side (@code{2C-split}). The current @@ -2898,21 +2896,19 @@ This command is appropriate when you have a buffer that already contains two-column text, and you wish to separate the columns temporarily. @item @kbd{@key{F2} b @var{buffer} @key{RET}} -@itemx @kbd{C-x 6 b @var{buffer} @key{RET}} @kindex F2 b -@kindex C-x 6 b @findex 2C-associate-buffer Enter two-column mode using the current buffer as the left-hand buffer, and using buffer @var{buffer} as the right-hand buffer (@code{2C-associate-buffer}). @end table - @kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which -is a string that appears on each line between the two columns. You can -specify the width of the separator with a numeric argument to -@kbd{@key{F2} s}; that many characters, before point, constitute the -separator string. By default, the width is 1, so the column separator -is the character before point. + @kbd{@key{F2} s} looks for a column separator, which is a string +that appears on each line between the two columns. You can specify +the width of the separator with a numeric argument to @kbd{@key{F2} +s}; that many characters, before point, constitute the separator +string. By default, the width is 1, so the column separator is the +character before point. When a line has the separator at the proper place, @kbd{@key{F2} s} puts the text after the separator into the right-hand buffer, and @@ -2924,25 +2920,22 @@ mode: write it in the left-hand buffer, and put an empty line in the right-hand buffer.) @kindex F2 RET -@kindex C-x 6 RET @findex 2C-newline - The command @kbd{@key{F2} @key{RET}} or @kbd{C-x 6 @key{RET}} -(@code{2C-newline}) inserts a newline in each of the two buffers at -corresponding positions. This is the easiest way to add a new line to -the two-column text while editing it in split buffers. + The command @kbd{@key{F2} @key{RET}} (@code{2C-newline}) inserts +a newline in each of the two buffers at corresponding positions. +This is the easiest way to add a new line to the two-column text while +editing it in split buffers. @kindex F2 1 -@kindex C-x 6 1 @findex 2C-merge When you have edited both buffers as you wish, merge them with -@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the +@kbd{@key{F2} 1} (@code{2C-merge}). This copies the text from the right-hand buffer as a second column in the other buffer. To go back to two-column editing, use @kbd{@key{F2} s}. @kindex F2 d -@kindex C-x 6 d @findex 2C-dissociate - Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers, -leaving each as it stands (@code{2C-dissociate}). If the other buffer, -the one not current when you type @kbd{@key{F2} d}, is empty, -@kbd{@key{F2} d} kills it. + Use @kbd{@key{F2} d} to dissociate the two buffers, leaving each as +it stands (@code{2C-dissociate}). If the other buffer, the one not +current when you type @kbd{@key{F2} d}, is empty, @kbd{@key{F2} d} +kills it. diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index b8eed0a501c..58f4a6687d9 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -545,8 +545,8 @@ key. @item @cindex @kbd{C-x 6} -@vindex 2C-mode-map -@code{2C-mode-map} is the global keymap used for the @kbd{C-x 6} prefix +@vindex ctl-x-6-map +@code{ctl-x-6-map} is the global keymap used for the @kbd{C-x 6} prefix key. @item diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index bcf8f175e09..1ee4816b0c7 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -21,7 +21,7 @@ keymaps, @pxref{Keymaps}. @c Don't add xrefs to things covered in {Keymaps}. @table @code @item 2C-mode-map -A sparse keymap for subcommands of the prefix @kbd{C-x 6}.@* +A sparse keymap for subcommands of the prefix @key{F2}.@* @xref{Two-Column,, Two-Column Editing, emacs, The GNU Emacs Manual}. @item abbrev-map @@ -42,6 +42,9 @@ A sparse keymap for subcommands of the prefix @kbd{C-x 4}. @item ctl-x-5-map A sparse keymap for subcommands of the prefix @kbd{C-x 5}. +@item ctl-x-6-map +A sparse keymap for subcommands of the prefix @kbd{C-x 6}. + @item ctl-x-map A full keymap for @kbd{C-x} commands. diff --git a/etc/NEWS b/etc/NEWS index 0edbec68944..beb15776ef6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2106,6 +2106,11 @@ immediately. Type 'M-x so-long-commentary' for full documentation. * Incompatible Lisp Changes in Emacs 27.1 +--- +** Two-column mode provides its C-x 6 prefix map only after loading +two-column.el. Its prefix key F2 is still available globally +along with C-x 6 used by the tab commands globally. + --- ** Incomplete destructive splicing support has been removed. Support for Common Lisp style destructive splicing (",.") was diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index ea111f2d3f1..5c20c0526d4 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -34138,7 +34138,6 @@ resumed later. ;;;;;; 0 0)) ;;; Generated autoloads from textmodes/two-column.el (autoload '2C-command "two-column" () t 'keymap) - (global-set-key "\C-x6" '2C-command) (global-set-key [f2] '2C-command) (autoload '2C-two-columns "two-column" "\ diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index e1ebf1a02a0..5bc70d0bd5f 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -184,7 +184,9 @@ minus this value." ;; This one is for historical reasons and simple keyboards, it is not ;; at all mnemonic. All usual sequences containing 2 were used, and ;; f2 could not be set up in a standard way under Emacs 18. -;;;###autoload (global-set-key "\C-x6" '2C-command) +;; This prefix is bound only after loading this package +;; to not conflict with the C-x 6 prefix used by tab commands. +(global-set-key "\C-x6" '2C-command) ;;;###autoload (global-set-key [f2] '2C-command)