From df5048087873bfab1b273d4f22746ad2539997e5 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 10 Jul 2015 12:37:31 -0700 Subject: [PATCH] prettyprint.stylesheet: use assoc-union! and set-at when possible. --- basis/prettyprint/stylesheet/stylesheet.factor | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/basis/prettyprint/stylesheet/stylesheet.factor b/basis/prettyprint/stylesheet/stylesheet.factor index 4056a27e9a..f19c34db2a 100644 --- a/basis/prettyprint/stylesheet/stylesheet.factor +++ b/basis/prettyprint/stylesheet/stylesheet.factor @@ -23,16 +23,19 @@ GENERIC: word-style ( word -- style ) M: word word-style [ presented associate ] - [ "word-style" word-prop >hashtable ] bi assoc-union ; + [ "word-style" word-prop ] bi assoc-union! ; M: highlighted-word word-style - call-next-method COLOR: DarkSlateGray foreground associate - swap assoc-union ; + call-next-method + COLOR: DarkSlateGray foreground pick set-at ;