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

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

[elpa] externals/setup 360cd7b37f: Detect if the FEATURE argument to :bi


From: ELPA Syncer
Subject: [elpa] externals/setup 360cd7b37f: Detect if the FEATURE argument to :bind-into is a map
Date: Sun, 23 Jan 2022 07:57:59 -0500 (EST)

branch: externals/setup
commit 360cd7b37f01a9cb9ba4338827a8bd9065902677
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Detect if the FEATURE argument to :bind-into is a map
---
 setup.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/setup.el b/setup.el
index 6adb13f00c..8c7277c38c 100644
--- a/setup.el
+++ b/setup.el
@@ -484,9 +484,11 @@ the first FEATURE."
   :repeatable t)
 
 (setup-define :bind-into
-  (lambda (feature &rest rest)
-    `(:with-feature ,feature (:bind ,@rest)))
-  :documentation "Bind into keys into the map of FEATURE.
+  (lambda (feature-or-map &rest rest)
+    (if (string-match-p "-map\\'" (symbol-name feature-or-map))
+        `(:with-map ,feature-or-map (:bind ,@rest))
+      `(:with-feature ,feature-or-map (:bind ,@rest))))
+  :documentation "Bind into keys into the map of FEATURE-OR-MAP.
 The arguments REST are handled as by `:bind'."
   :debug '(sexp &rest form sexp)
   :indent 1)



reply via email to

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