C. Michael Pilato wrote on Thu, Jun 23, 2011 at 08:57:28 -0400:
> Omigosh.  +1.  I, too, know we're well into bikeshed territory here, but if
> we're going to paint our sheds anyway, why use only a clear-coat stain
> ("return svn_error_return(...)")?  Use a color that says something!
> 
> "svn_error_trace" is a fine choice of a name.  Just a pity that it's a
> character shorter than the existing name, though, as far as the
> global-search-and-replace goes.  Mmm... indentation...  :-(

This /can/ be automated.

In Vim, I might do:

:set autowrite
:set cindent cinoptions=>1s,e0,n0,f0,{.5s,}0,^-.5s,=.5s,t0,+1s,c3,(0,u0,:0
:grep -Rw svn_error_return subversion
qancesvn_error_trace^[gw%:cn
q@a@@66@@

(where ^[ is a real ctrl-[)

and it would work for 95% of the instances.  I used this approach in the
past (for one of my "Fix something across the whole C codebase" commits)
and it worked nicely.

Another value for the macro would be:
qancesvn_error_trace^[lv%oj:s/^.//
q

Reply via email to