emacs-diffs
[Top][All Lists]
Advanced

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

master cde5dcd: Change the call signature to keymap-substitute


From: Lars Ingebrigtsen
Subject: master cde5dcd: Change the call signature to keymap-substitute
Date: Wed, 17 Nov 2021 02:34:39 -0500 (EST)

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

    Change the call signature to keymap-substitute
    
    * lisp/keymap.el (keymap-substitute): Make the keymap the first
    parameter for symmetry with the other functions.
    * lisp/emacs-lisp/shortdoc.el (keymaps):
    * lisp/emacs-lisp/bytecomp.el (lambda): Adjust.
---
 lisp/emacs-lisp/bytecomp.el | 2 +-
 lisp/emacs-lisp/shortdoc.el | 2 +-
 lisp/keymap.el              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4078a73..3338c38 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5066,7 +5066,7 @@ binding slots have been popped."
    (keymap-unset 2)
    (keymap-global-unset 1)
    (keymap-local-unset 1)
-   (keymap-substitute 1 2)
+   (keymap-substitute 2 3)
    (keymap-set-after 2)
    (key-translate 1 2)
    (keymap-lookup 2)
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 228d1e0..157209f 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -1242,7 +1242,7 @@ There can be any number of :example/:result elements."
   (keymap-global-unset
    :no-eval (keymap-global-unset "C-c C-c"))
   (keymap-substitute
-   :no-eval (keymap-substitute "C-c C-c" "M-a" map))
+   :no-eval (keymap-substitute map "C-c C-c" "M-a"))
   (keymap-set-after
    :no-eval (keymap-set-after map "<separator-2>" menu-bar-separator))
   "Predicates"
diff --git a/lisp/keymap.el b/lisp/keymap.el
index b634487..a9331e1 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -121,7 +121,7 @@ parent keymap to be used."
   (keymap--check key)
   (define-key keymap (key-parse key) nil remove))
 
-(defun keymap-substitute (olddef newdef keymap &optional oldmap prefix)
+(defun keymap-substitute (keymap olddef newdef &optional oldmap prefix)
   "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
 In other words, OLDDEF is replaced with NEWDEF wherever it appears.
 Alternatively, if optional fourth argument OLDMAP is specified, we redefine



reply via email to

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