- (pm-hbtchunkmode :mode ',(intern (format "pico8-%s-mode" name))
- :head-mode 'host
- :head-reg ,(format "^__%s__\n" name)
- :tail-reg "^__[a-z]\\{3,5\\}__\n\\|^\n\\'")))
-
-(defconst pico8--pm-poly
- (pm-polymode-multi
- :hostmode
- (defconst pico8--pm-host
- (pm-bchunkmode :mode 'pico8-cartridge-mode))
+ (pm-inner-chunkmode
+ :name ,name
+ :mode ',(intern (format "pico8-%s-mode" name))
+ :head-mode 'host
+ :head-matcher ,(format "^__%s__\n" name)
+ :tail-matcher "^__[a-z]\\{3,5\\}__\n\\|^\n\\'")))
+
+
+(defconst pico8--pm-host
+ (pm-host-chunkmode :name "PICO-8" :mode 'pico8-cartridge-mode))
+
+(define-polymode pico8-mode
+ :hostmode 'pico8--pm-host