Cleanup some uses of global [ ] bind.

db4
John Benediktsson 2011-10-19 10:40:12 -07:00
parent 469f4314df
commit d1f5fefab0
5 changed files with 18 additions and 19 deletions

View File

@ -245,13 +245,13 @@ M: dinput-game-input-backend (close-game-input)
delete-dinput ; delete-dinput ;
M: dinput-game-input-backend (reset-game-input) M: dinput-game-input-backend (reset-game-input)
global [ [
{ {
+dinput+ +keyboard-device+ +keyboard-state+ +dinput+ +keyboard-device+ +keyboard-state+
+controller-devices+ +controller-guids+ +controller-devices+ +controller-guids+
+device-change-window+ +device-change-handle+ +device-change-window+ +device-change-handle+
} [ off ] each } [ off ] each
] bind ; ] with-global ;
M: dinput-game-input-backend get-controllers M: dinput-game-input-backend get-controllers
+controller-devices+ get-global +controller-devices+ get-global

View File

@ -84,13 +84,13 @@ M: xinput-game-input-backend (close-game-input)
FALSE XInputEnable ; FALSE XInputEnable ;
M: xinput-game-input-backend (reset-game-input) M: xinput-game-input-backend (reset-game-input)
global [ [
{ {
+dinput+ +keyboard-device+ +keyboard-state+ +dinput+ +keyboard-device+ +keyboard-state+
+controller-devices+ +controller-guids+ +controller-devices+ +controller-guids+
+device-change-window+ +device-change-handle+ +device-change-window+ +device-change-handle+
} [ off ] each } [ off ] each
] bind ; ] with-global ;
M: xinput-game-input-backend get-controllers M: xinput-game-input-backend get-controllers
{ 0 1 2 3 } ; { 0 1 2 3 } ;

View File

@ -45,8 +45,7 @@ TUPLE: deploy-gadget < pack vocab settings ;
1 >>fill ; 1 >>fill ;
: <deploy-settings> ( vocab -- control ) : <deploy-settings> ( vocab -- control )
default-config [ <model> ] assoc-map default-config [ <model> ] assoc-map [
[
<pile> <pile>
bundle-name bundle-name
deploy-ui deploy-ui
@ -57,8 +56,7 @@ TUPLE: deploy-gadget < pack vocab settings ;
deploy-settings-theme deploy-settings-theme
namespace <mapping> >>model namespace <mapping> >>model
] ] bind ;
bind ;
: find-deploy-gadget ( gadget -- deploy-gadget ) : find-deploy-gadget ( gadget -- deploy-gadget )
[ deploy-gadget? ] find-parent ; [ deploy-gadget? ] find-parent ;

View File

@ -114,7 +114,7 @@ call( -- )
! Builtin classes ! Builtin classes
: lookup-type-number ( word -- n ) : lookup-type-number ( word -- n )
global [ target-word ] bind type-number ; [ target-word ] with-global type-number ;
: register-builtin ( class -- ) : register-builtin ( class -- )
[ dup lookup-type-number "type" set-word-prop ] [ dup lookup-type-number "type" set-word-prop ]

View File

@ -38,7 +38,8 @@ SYMBOL: counter
0 counter set-global 0 counter set-global
M: observer definitions-changed 2drop global [ counter inc ] bind ; M: observer definitions-changed
2drop [ counter inc ] with-global ;
[ gensym [ ] ( -- ) define-declared ] with-compilation-unit [ gensym [ ] ( -- ) define-declared ] with-compilation-unit