[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup 5c7c779 1/2: Handle more kinds of commands in :gl
From: |
ELPA Syncer |
Subject: |
[elpa] externals/setup 5c7c779 1/2: Handle more kinds of commands in :global, :bind and :rebind |
Date: |
Wed, 7 Jul 2021 11:57:20 -0400 (EDT) |
branch: externals/setup
commit 5c7c7797c246ceef50851d2dd831b19450eed1f7
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Handle more kinds of commands in :global, :bind and :rebind
---
setup.el | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/setup.el b/setup.el
index 257c50b..461b438 100644
--- a/setup.el
+++ b/setup.el
@@ -305,7 +305,13 @@ the first FEATURE."
,(cond ((stringp key) (kbd key))
((symbolp key) `(kbd ,key))
(t key))
- #',command))
+ ,(cond ((eq (car-safe command) 'function)
+ command)
+ ((eq (car-safe command) 'quote)
+ `#',(cadr command))
+ ((symbolp 'quote)
+ `#',command)
+ (command))))
:documentation "Globally bind KEY to COMMAND."
:debug '(form sexp)
:repeatable t)
@@ -316,7 +322,13 @@ the first FEATURE."
,(cond ((stringp key) (kbd key))
((symbolp key) `(kbd ,key))
(t key))
- #',command))
+ ,(cond ((eq (car-safe command) 'function)
+ command)
+ ((eq (car-safe command) 'quote)
+ `#',(cadr command))
+ ((symbolp 'quote)
+ `#',command)
+ (command))))
:documentation "Bind KEY to COMMAND in current map."
:after-loaded t
:debug '(form sexp)
@@ -343,7 +355,13 @@ the first FEATURE."
,(cond ((stringp key) (kbd key))
((symbolp key) `(kbd ,key))
(t key))
- #',command)))
+ ,(cond ((eq (car-safe command) 'function)
+ command)
+ ((eq (car-safe command) 'quote)
+ `#',(cadr command))
+ ((symbolp 'quote)
+ `#',command)
+ (command)))))
:documentation "Unbind the current key for COMMAND, and bind it to KEY."
:after-loaded t
:debug '(form sexp)