From: Lars Ingebrigtsen Date: Wed, 10 Feb 2021 18:38:10 +0000 (+0100) Subject: Remove the 'M-o' ('facemap-keymap') binding experimentally X-Git-Tag: emacs-28.0.90~3821 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=21e475ea0c0d04ae7634f377ed64fe179388b133;p=emacs.git Remove the 'M-o' ('facemap-keymap') binding experimentally * doc/lispref/maps.texi (Standard Keymaps): * doc/lispref/keymaps.texi (Prefix Keys): Remove mentions. * etc/facemenu-removal.txt: New temporary file. * lisp/loadup.el: Don't load facemenu.el. (removed-facemenu-command): New command. (facemenu-keymap-restore): New function. * lisp/textmodes/text-mode.el (center-paragraph): Remove binding. (center-line): Remove binding. --- diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 55d179b8753..6a227e3a792 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -573,12 +573,6 @@ key. @code{search-map} is the global keymap used for the @kbd{M-s} prefix key. -@item -@cindex @kbd{M-o} -@vindex facemenu-keymap -@code{facemenu-keymap} is the global keymap used for the @kbd{M-o} -prefix key. - @item The other Emacs prefix keys are @kbd{C-x @@}, @kbd{C-x a i}, @kbd{C-x @key{ESC}} and @kbd{@key{ESC} @key{ESC}}. They use keymaps that have diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index aea02424086..59c6e6f57ad 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -53,9 +53,6 @@ A sparse keymap for subcommands of the prefix @kbd{C-x r}.@* @item esc-map A full keymap for @key{ESC} (or @key{Meta}) commands. -@item facemenu-keymap -A sparse keymap used for the @kbd{M-o} prefix key. - @item function-key-map The parent keymap of all @code{local-function-key-map} (q.v.@:) instances. diff --git a/etc/NEWS b/etc/NEWS index 3cbf2a0fe7c..67fc49f1817 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2048,6 +2048,11 @@ first). * Incompatible Editing Changes in Emacs 28.1 +** The 'M-o' ('facemanu-keymap') global binding has been removed. + +** The 'M-o M-s' and 'M-o M-S' global bindings have been removed. +Use 'M-x center-line' and 'M-x center-paragraph' instead. + ** In 'f90-mode', the backslash character ('\') no longer escapes. For about a decade, the backslash character has no longer had a special escape syntax in Fortran F90. To get the old behaviour back, diff --git a/etc/facemenu-removal.txt b/etc/facemenu-removal.txt new file mode 100644 index 00000000000..9a969df0e49 --- /dev/null +++ b/etc/facemenu-removal.txt @@ -0,0 +1,20 @@ +`facemenu-keymap' (normally bound to `M-o') has been disabled. +============================================================== + +We've disabled the normal `M-o' keymap for a month (until March the +10th, 2021) in the development version of Emacs to see whether anybody +uses this feature. + +If the removal of this key binding doesn't annoy too many people, the +plan is to then leave the it unbound, for usage by third-party +packages and users. + +If you wish to restore the binding during the trial period, you can +put the following in your .emacs file: + +(facemenu-keymap-restore) + +After the trial period is over, the function will be removed. + +If you wish to protest the removal of the `M-o' key binding, please +send your thoughts to the emacs-devel@gnu.org mailing list. diff --git a/lisp/loadup.el b/lisp/loadup.el index 9cee6a2fd83..3ee8bed1842 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -253,9 +253,6 @@ (load "startup") (load "term/tty-colors") (load "font-core") -;; facemenu must be loaded before font-lock, because `facemenu-keymap' -;; needs to be defined when font-lock is loaded. -(load "facemenu") (load "emacs-lisp/syntax") (load "font-lock") (load "jit-lock") @@ -477,6 +474,28 @@ lost after dumping"))) ;; Make sure we will attempt bidi reordering henceforth. (setq redisplay--inhibit-bidi nil) + +;; Experimental feature removal. +(define-key global-map "\M-o" #'removed-facemenu-command) + +(defun removed-facemenu-command () + "Transition command during test period for facemenu removal." + (interactive) + (switch-to-buffer "*Facemenu Removal*") + (let ((inhibit-read-only t)) + (erase-buffer) + (insert-file-contents + (expand-file-name "facemenu-removal.txt" data-directory))) + (goto-char (point-min)) + (special-mode)) + +(defun facemenu-keymap-restore () + "Restore the facemenu keymap." + (require 'facemenu) + (define-key facemenu-keymap "\eS" 'center-paragraph) + (define-key facemenu-keymap "\es" 'center-line)) + + (if dump-mode (let ((output (cond ((equal dump-mode "pdump") "emacs.pdmp") ((equal dump-mode "dump") "emacs") diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 1432ab6a300..ab9f7b9c7c0 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -169,8 +169,6 @@ both existing buffers and buffers that you subsequently create." (if enable-mode "enabled" "disabled")))) -(define-key facemenu-keymap "\eS" 'center-paragraph) - (defun center-paragraph () "Center each nonblank line in the paragraph at or after point. See `center-line' for more info." @@ -198,8 +196,6 @@ See `center-line' for more info." (center-line)) (forward-line 1))))) -(define-key facemenu-keymap "\es" 'center-line) - (defun center-line (&optional nlines) "Center the line point is on, within the width specified by `fill-column'. This means adjusting the indentation so that it equals