From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v619.2) To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Message-Id: <4fc1ef2c1a6c6dcc71be9f056b905580@telus.net> Content-Type: multipart/mixed; boundary=Apple-Mail-9--451312138 From: Paul Lalonde Date: Sun, 10 Apr 2005 08:35:57 -0700 Subject: [9fans] Acme fix Topicbox-Message-UUID: 3540a48a-ead0-11e9-9d60-3106f5b1d025 --Apple-Mail-9--451312138 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed I have a small patch that fixes acme's disposition to trim addresses from explicitly swept filename selections on a 2-1 chord, and which I believe breaks nothing else. Anyone care to let me know if this breaks any of their usage? I've attached the cvs diff. Paul --Apple-Mail-9--451312138 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="foo" Content-Disposition: attachment; filename=foo 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)) --Apple-Mail-9--451312138--