shell_ready function

2004-08-18 Thread Joe Orton
Does the quote escaping really work in this function? It confuses emacs font-lock mode which doesn't see a closing quote so thinks the rest of the file is part of the string. This fixes at least the latter: Index: TestConfig.pm ===

Re: shell_ready function

2004-08-18 Thread Geoffrey Young
Joe Orton wrote: Does the quote escaping really work in this function? hmm, it doesn't look like it does. I think this was part of some work that stas and ken were doing, though, and IIRC it was some win32 command line thing. but I could be wrong. It confuses emacs font-lock mode which

Re: shell_ready function

2004-08-18 Thread Stas Bekman
Geoffrey Young wrote: Joe Orton wrote: Does the quote escaping really work in this function? hmm, it doesn't look like it does. I think this was part of some work that stas and ken were doing, though, and IIRC it was some win32 command line thing. but I could be wrong. It confuses emacs

Re: shell_ready function

2004-08-18 Thread Geoffrey Young
and here is the optimized version of Geoff's one: sub shell_ready_stas { my $arg = shift; $arg =~ s!\\?!\\!g; return qq[$arg]; } :) Benchmark: timing 100 iterations of geoff, stas... geoff: 64 wallclock secs (56.35 usr + 0.10 sys = 56.45 CPU) @ 17714.79/s