emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/embark 087bad2824: Flip the meaning of the argument to


From: ELPA Syncer
Subject: [elpa] externals/embark 087bad2824: Flip the meaning of the argument to embark-bindings
Date: Tue, 8 Aug 2023 12:58:00 -0400 (EDT)

branch: externals/embark
commit 087bad28245a105d084740cd7981ca711f4c5637
Author: Omar Antolín Camarena <omar.antolin@gmail.com>
Commit: Omar Antolín Camarena <omar.antolin@gmail.com>

    Flip the meaning of the argument to embark-bindings
    
    I do this out of (1) a sincere belief that it is more common to want
    only local bindings, and (2) anecdotal evidence: I personally almost
    never call this to look at global bindings.
    
    @minad: we talked about this change before, and I decided to do it.
---
 CHANGELOG.org |  3 +++
 embark.el     | 19 ++++++++++---------
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index d8c35e561a..7bc5c21fa5 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -14,6 +14,9 @@
 - =embark-become= now removes any invisible text from the minibuffer
   input on the grounds that users probably expect the target command
   to receive exactly the input they can see.
+- The meaning of the prefix argument in =embark-bindings= has flipped:
+  now by default global key bindings are excluded and you =C-u= to
+  include them.
 * Version 0.22.1 (2023-04-20)
 ** New feature: selections
 Now users can select several targets to make an ad hoc collection. The
diff --git a/embark.el b/embark.el
index 459ae2eb44..7e812171c9 100644
--- a/embark.el
+++ b/embark.el
@@ -1816,21 +1816,22 @@ user for a KEYMAP variable."
     (call-interactively command)))
 
 ;;;###autoload
-(defun embark-bindings (no-global)
-  "Explore all current command key bindings with `completing-read'.
+(defun embark-bindings (global)
+  "Explore current command key bindings with `completing-read'.
 The selected command will be executed.
 
-If NO-GLOBAL is non-nil (interactively, if called with a prefix
-argument) omit global key bindings; this leaves key bindings from
-minor mode maps and the local map (usually set by the major
-mode), but also less common keymaps such as those from a text
-property or overlay, or the overriding maps:
-`overriding-terminal-local-map' and `overriding-local-map'."
+This shows key bindings from minor mode maps and the local
+map (usually set by the major mode), but also less common keymaps
+such as those from a text property or overlay, or the overriding
+maps: `overriding-terminal-local-map' and `overriding-local-map'.
+
+Additionally, if GLOBAL is non-nil (interactively, if called with
+a prefix argument), this command includes global key bindings."
   (interactive "P")
   (embark-bindings-in-keymap
    (make-composed-keymap
     (let ((all-maps (current-active-maps t)))
-      (if no-global (remq global-map all-maps) all-maps)))))
+      (if global all-maps (remq global-map all-maps))))))
 
 ;;;###autoload
 (defun embark-bindings-at-point ()



reply via email to

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