Browse files

Use a let statement to avoid the shared context.

  • Loading branch information...
1 parent b0e610d commit ccb09e4ede12310a6ccd52359450721aaade1e8a @martinh martinh committed Feb 19, 2012
Showing with 44 additions and 45 deletions.
  1. +44 −45 app/ex.nu
View
89 app/ex.nu
@@ -1,45 +1,44 @@
-(set ex (ExMap defaultMap))
-
-(ex define:"!" syntax:"rex|" as:"ex_bang:")
-(ex define:"#" syntax:"rc" as:"ex_goto:")
-;(ex define:"&" syntax:"em" as:"ex_subagain:")
-;(ex define:'("*" "@") syntax:"R" as:"ex_at:")
-;(ex define:"<" syntax:"rc" as:"ex_shift_left:")
-;(ex define:">" syntax:"rc" as:"ex_shift_right:")
-((ex define:'("buffer" "b") syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
-((ex define:"sbuffer" syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
-((ex define:"vbuffer" syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
-((ex define:"tbuffer" syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
-((ex define:"bdelete" syntax:"!e1" as:"ex_bdelete:") setCompletion:(ViBufferCompletion new))
-(ex define:'("cd" "chdir") syntax:"!e1x" as:"ex_cd:")
-(ex define:"close" syntax:"!" as:"ex_close:")
-(ex define:'("copy" "t") syntax:"rL" as:"ex_copy:")
-(ex define:'("delete" "d") syntax:"rRc" as:"ex_delete:")
-(ex define:'("edit" "e") syntax:"!+e1x" as:"ex_edit:")
-(ex define:"eval" syntax:"r" as:"ex_eval:")
-(ex define:"export" syntax:"E" as:"ex_export:")
-;(ex define:'("global" "g") syntax:"r%!/e|" as:"ex_global:")
-;(ex define:"join" syntax:"r!c" as:"ex_join:")
-;(ex define:'("mark" "k") syntax:"re1" as:"ex_mark:")
-;(ex define:"map" syntax:"!e" as:"ex_map:")
-(ex define:'("move" "m") syntax:"rL" as:"ex_move:")
-;(ex define:"put" syntax:"rR" as:"ex_put:")
-(ex define:"pwd" syntax:"" as:"ex_pwd:")
-(ex define:"quit" syntax:"!" as:"ex_quit:")
-;(ex define:"read" syntax:"rfe1x" as:"ex_read:")
-(ex define:'("s" "substitute") syntax:"r~c" as:"ex_substitute:")
-(ex define:"set" syntax:"e" as:"ex_set:")
-((ex define:"setfiletype" syntax:"E1" as:"ex_setfiletype:") setCompletion:(ViSyntaxCompletion new))
-(ex define:"split" syntax:"e1x" as:"ex_split:")
-(ex define:"new" syntax:"e1x" as:"ex_new:")
-(ex define:'("tabedit" "tabnew") syntax:"+ex" as:"ex_tabedit:")
-;(ex define:"unmap" syntax:"!e" as:"ex_unmap:")
-;(ex define:'("v" "vglobal") syntax:"r%/e|" as:"ex_vglobal:")
-;(ex define:"version" syntax:"" as:"ex_version:")
-(ex define:"vsplit" syntax:"e1x" as:"ex_vsplit:")
-(ex define:"vnew" syntax:"e1x" as:"ex_vnew:")
-(ex define:'("write" "w") syntax:"r%!f>e1x" as:"ex_write:")
-(ex define:"wq" syntax:"r%!e1x" as:"ex_wq:")
-(ex define:'("xit" "exit") syntax:"r%!e1x" as:"ex_xit:")
-(ex define:"yank" syntax:"rRc" as:"ex_yank:")
-
+(let ((ex (ExMap defaultMap)))
+ (ex define:"!" syntax:"rex|" as:"ex_bang:")
+ (ex define:"#" syntax:"rc" as:"ex_goto:")
+ ;(ex define:"&" syntax:"em" as:"ex_subagain:")
+ ;(ex define:'("*" "@") syntax:"R" as:"ex_at:")
+ ;(ex define:"<" syntax:"rc" as:"ex_shift_left:")
+ ;(ex define:">" syntax:"rc" as:"ex_shift_right:")
+ ((ex define:'("buffer" "b") syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
+ ((ex define:"sbuffer" syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
+ ((ex define:"vbuffer" syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
+ ((ex define:"tbuffer" syntax:"E1" as:"ex_buffer:") setCompletion:(ViBufferCompletion new))
+ ((ex define:"bdelete" syntax:"!e1" as:"ex_bdelete:") setCompletion:(ViBufferCompletion new))
+ (ex define:'("cd" "chdir") syntax:"!e1x" as:"ex_cd:")
+ (ex define:"close" syntax:"!" as:"ex_close:")
+ (ex define:'("copy" "t") syntax:"rL" as:"ex_copy:")
+ (ex define:'("delete" "d") syntax:"rRc" as:"ex_delete:")
+ (ex define:'("edit" "e") syntax:"!+e1x" as:"ex_edit:")
+ (ex define:"eval" syntax:"r" as:"ex_eval:")
+ (ex define:"export" syntax:"E" as:"ex_export:")
+ ;(ex define:'("global" "g") syntax:"r%!/e|" as:"ex_global:")
+ ;(ex define:"join" syntax:"r!c" as:"ex_join:")
+ ;(ex define:'("mark" "k") syntax:"re1" as:"ex_mark:")
+ ;(ex define:"map" syntax:"!e" as:"ex_map:")
+ (ex define:'("move" "m") syntax:"rL" as:"ex_move:")
+ ;(ex define:"put" syntax:"rR" as:"ex_put:")
+ (ex define:"pwd" syntax:"" as:"ex_pwd:")
+ (ex define:"quit" syntax:"!" as:"ex_quit:")
+ ;(ex define:"read" syntax:"rfe1x" as:"ex_read:")
+ (ex define:'("s" "substitute") syntax:"r~c" as:"ex_substitute:")
+ (ex define:"set" syntax:"e" as:"ex_set:")
+ ((ex define:"setfiletype" syntax:"E1" as:"ex_setfiletype:") setCompletion:(ViSyntaxCompletion new))
+ (ex define:"split" syntax:"e1x" as:"ex_split:")
+ (ex define:"new" syntax:"e1x" as:"ex_new:")
+ (ex define:'("tabedit" "tabnew") syntax:"+ex" as:"ex_tabedit:")
+ ;(ex define:"unmap" syntax:"!e" as:"ex_unmap:")
+ ;(ex define:'("v" "vglobal") syntax:"r%/e|" as:"ex_vglobal:")
+ ;(ex define:"version" syntax:"" as:"ex_version:")
+ (ex define:"vsplit" syntax:"e1x" as:"ex_vsplit:")
+ (ex define:"vnew" syntax:"e1x" as:"ex_vnew:")
+ (ex define:'("write" "w") syntax:"r%!f>e1x" as:"ex_write:")
+ (ex define:"wq" syntax:"r%!e1x" as:"ex_wq:")
+ (ex define:'("xit" "exit") syntax:"r%!e1x" as:"ex_xit:")
+ (ex define:"yank" syntax:"rRc" as:"ex_yank:")
+)

0 comments on commit ccb09e4

Please sign in to comment.