emacs-diffs
[Top][All Lists]
Advanced

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

master 21e475e: Remove the 'M-o' ('facemap-keymap') binding experimental


From: Lars Ingebrigtsen
Subject: master 21e475e: Remove the 'M-o' ('facemap-keymap') binding experimentally
Date: Wed, 10 Feb 2021 13:38:24 -0500 (EST)

branch: master
commit 21e475ea0c0d04ae7634f377ed64fe179388b133
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 doc/lispref/keymaps.texi    |  6 ------
 doc/lispref/maps.texi       |  3 ---
 etc/NEWS                    |  5 +++++
 etc/facemenu-removal.txt    | 20 ++++++++++++++++++++
 lisp/loadup.el              | 25 ++++++++++++++++++++++---
 lisp/textmodes/text-mode.el |  4 ----
 6 files changed, 47 insertions(+), 16 deletions(-)

diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 55d179b..6a227e3 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -574,12 +574,6 @@ key.
 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
 no special names.
diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi
index aea0242..59c6e6f 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 3cbf2a0..67fc49f 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 0000000..9a969df
--- /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 9cee6a2..3ee8bed 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 1432ab6..ab9f7b9 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



reply via email to

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