Index: exec.c =================================================================== RCS file: /cvs/plan9/src/cmd/acme/exec.c,v retrieving revision 1.20 diff -r1.20 exec.c 270c270 < if(expand(argt, argt->q0, argt->q1, &e)){ --- > if(expand(argt, argt->q0, argt->q1, &e, FALSE)){ Index: fns.h =================================================================== RCS file: /cvs/plan9/src/cmd/acme/fns.h,v retrieving revision 1.11 diff -r1.11 fns.h 89c89 < int expand(Text*, uint, uint, Expand*); --- > int expand(Text*, uint, uint, Expand*, int); Index: look.c =================================================================== RCS file: /cvs/plan9/src/cmd/acme/look.c,v retrieving revision 1.13 diff -r1.13 look.c 68c68 < expanded = expand(t, q0, q1, &e); --- > expanded = expand(t, q0, q1, &e, TRUE); 612a613,617 > > // PAL: Two kinds of expansion, hence the testfilename flag: > // one is true expansion when q0==q1; the other is q0!=q1, which degenerates > // into a check for a filename without any expansion. Button3 uses > // this to check if the selected string is a filename. 614c619 < expand(Text *t, uint q0, uint q1, Expand *e) --- > expand(Text *t, uint q0, uint q1, Expand *e, int testfilename) 627c632 < if(expandfile(t, q0, q1, e)) --- > if((testfilename || q0 == q1) && expandfile(t, q0, q1, e))