diff options
Diffstat (limited to 'lisp/+setup.el')
-rw-r--r-- | lisp/+setup.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/+setup.el b/lisp/+setup.el index 367fb01..d8e9bb8 100644 --- a/lisp/+setup.el +++ b/lisp/+setup.el | |||
@@ -94,5 +94,22 @@ replace itself with the RECIPE's package." | |||
94 | :indent 1 | 94 | :indent 1 |
95 | :shorthand #'+setup-straight-shorthand) | 95 | :shorthand #'+setup-straight-shorthand) |
96 | 96 | ||
97 | |||
98 | ;;; Redefines of `setup' forms | ||
99 | |||
100 | (setup-define :bind-into | ||
101 | (lambda (feature-or-map &rest rest) | ||
102 | (cl-loop for f/m in (ensure-list feature-or-map) | ||
103 | collect (if (string-match-p "-map\\'" (symbol-name f/m)) | ||
104 | `(:with-map ,f/m (:bind ,@rest)) | ||
105 | `(:with-feature ,f/m (:bind ,@rest))) | ||
106 | into forms | ||
107 | finally return `(progn ,@forms))) | ||
108 | :documentation "Bind into keys into the map(s) of FEATURE-OR-MAP. | ||
109 | FEATURE-OR-MAP can be a feature or map name or a list of them. | ||
110 | The arguments REST are handled as by `:bind'." | ||
111 | :debug '(sexp &rest form sexp) | ||
112 | :indent 1) | ||
113 | |||
97 | (provide '+setup) | 114 | (provide '+setup) |
98 | ;;; +setup.el ends here | 115 | ;;; +setup.el ends here |