[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm e86dd4b761 4/5: Simplify the helm-command-prefix-key
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm e86dd4b761 4/5: Simplify the helm-command-prefix-key set function |
Date: |
Sun, 4 Jun 2023 04:00:53 -0400 (EDT) |
branch: elpa/helm
commit e86dd4b761db543cc9a05c0518a2efc539efa02d
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Simplify the helm-command-prefix-key set function
---
helm-global-bindings.el | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/helm-global-bindings.el b/helm-global-bindings.el
index b2a17a11a8..0bd318d014 100644
--- a/helm-global-bindings.el
+++ b/helm-global-bindings.el
@@ -39,12 +39,10 @@ Using `setq' to modify this variable will have no effect."
:type '(choice (string :tag "Key") (const :tag "no binding"))
:set
(lambda (var key)
- (when (and (boundp var) (symbol-value var))
- (define-key (current-global-map)
- (read-kbd-macro (symbol-value var)) nil))
+ (helm-aif (and (boundp var) (symbol-value var))
+ (global-unset-key (read-kbd-macro it)))
(when key
- (define-key (current-global-map)
- (read-kbd-macro key) 'helm-command-prefix))
+ (global-set-key (read-kbd-macro key) 'helm-command-prefix))
(set var key)))
(defvar helm-command-map