From 37407cde963ead9ca39ad086914fbbeeed7a24e7 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 16 Jan 2009 14:57:23 -0600 Subject: [PATCH] C-m expands macros in listener --- basis/ui/tools/operations/operations.factor | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/basis/ui/tools/operations/operations.factor b/basis/ui/tools/operations/operations.factor index aa45daf9eb..4746ed904f 100644 --- a/basis/ui/tools/operations/operations.factor +++ b/basis/ui/tools/operations/operations.factor @@ -10,7 +10,7 @@ tools.profiler tools.test tools.time tools.walker ui.commands ui.gadgets.editors ui.gestures ui.operations ui.tools.deploy vocabs vocabs.loader words sequences tools.vocabs classes compiler.units accessors -vocabs.parser ; +vocabs.parser macros.expander ; IN: ui.tools.operations V{ } clone operations set-global @@ -172,6 +172,13 @@ M: word com-stack-effect def>> com-stack-effect ; { +listener+ t } } define-operation +: com-expand-macros ( quot -- ) expand-macros . ; + +[ quotation? ] \ com-expand-macros H{ + { +keyboard+ T{ key-down f { C+ } "m" } } + { +listener+ t } +} define-operation + ! Operations -> commands source-editor "word"