@map: fix nested @map calls not inheriting let-bindings
This commit is contained in:
parent
7107d38d34
commit
3cfc7d1c0a
1 changed files with 4 additions and 4 deletions
|
@ -223,7 +223,7 @@ Example
|
|||
(cond
|
||||
;; it's a sub expr
|
||||
((listp key)
|
||||
(push `(@map ,@key) forms))
|
||||
(push (macroexpand `(@map ,@key)) forms))
|
||||
|
||||
;; it's a flag
|
||||
((keywordp key)
|
||||
|
@ -245,9 +245,9 @@ Example
|
|||
`(vconcat ,prefix (if (stringp ,def) (kbd ,def) ,def))
|
||||
`(vconcat ,prefix ,(if (stringp def) (kbd def) def))))))
|
||||
(:map (setq keymaps (-list (pop rest))))
|
||||
(:after (prog1 `((@after ,(pop rest) (@map ,@rest))) (setq rest '())))
|
||||
(:when (prog1 `((if ,(pop rest) (@map ,@rest))) (setq rest '())))
|
||||
(:unless (prog1 `((if (not ,(pop rest)) (@map ,@rest))) (setq rest '())))
|
||||
(:after (prog1 `((@after ,(pop rest) ,(macroexpand `(@map ,@rest)))) (setq rest '())))
|
||||
(:when (prog1 `((if ,(pop rest) ,(macroexpand `(@map ,@rest)))) (setq rest '())))
|
||||
(:unless (prog1 `((if (not ,(pop rest)) ,(macroexpand `(@map ,@rest)))) (setq rest '())))
|
||||
(otherwise ; might be a state prefix
|
||||
(mapc (lambda (letter)
|
||||
(cond ((assoc letter state-map)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue