From cf79e45cf597cb65e105f9f722bf8bde6a0fbfb2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 15 May 2017 11:45:52 +0200 Subject: [PATCH] map!: fix :when, :unless & :after blocks --- core/core-keybinds.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 646bc0b35..68cb95cbb 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -134,9 +134,9 @@ Example (setq key :prefix desc ""))) (pcase key - (:when (prog1 `((if ,(pop rest) ,(macroexpand `(map! ,@rest)))) (setq rest '()))) - (:unless (prog1 `((if (not ,(pop rest)) ,(macroexpand `(map! ,@rest)))) (setq rest '()))) - (:after (prog1 `((after! ,(pop rest) ,(macroexpand `(map! ,@rest)))) (setq rest '()))) + (:when (push `(if ,(pop rest) ,(macroexpand `(map! ,@rest))) forms) (setq rest '())) + (:unless (push `(if (not ,(pop rest)) ,(macroexpand `(map! ,@rest))) forms) (setq rest '())) + (:after (push `(after! ,(pop rest) ,(macroexpand `(map! ,@rest))) forms) (setq rest '())) (:desc (setq desc (pop rest))) (:map* (setq defer t) (push :map rest)) (:map