Arc Forumnew | comments | leaders | submitlogin
2 points by fallintothis 4006 days ago | link | parent

Ugh, he's relying on keyword names like a vim or emacs mode. So any new macros would need to be manually added to the right global variable.

"Ugh" is right. :) I think this is also a major problem with pprint.arc. A similar issue arose in https://bitbucket.org/fallintothis/contract/src/d1b4ff38afaf...

In the past I've tried to think about ways to handle it automatically, but I usually get hung up on macros and their pesky propensity for undoing assumptions. E.g., for my Vim ftplugin (https://bitbucket.org/fallintothis/arc-vim), I used the heuristic "is the macro's rest parameter named body?" to figure out the indentation of so-called "bodops"...except that I had to manually maintain white/blacklists of troublesome macros with code similar to http://arclanguage.org/item?id=11288