/*rexx*/ address "ISREDIT";"macro" /*********************************************************************/ /* David McRitchie, "The REXX Macros Toolbox", 1998/01/19 Mon */ /* TR -- Create */ /* ... around word at CURSOR */ /* Related macros: HTMLHYP */ /* word located at the cursor. User supplies the TR */ /*********************************************************************/ "(row,col) = cursor" /* wwwww abc */ "line_before .zcsr = Noteline (TR)" begtr = "" endTR="" "(line) = line" row oline = line line = translate(line," ","+%^&*()_+={}[]|\:;""'<>,.?/")||" " i = index(substr(line,col)," ") - 1 k=col do j = col to 1 by -1 if " " = substr(line,j,1) then leave; k=j end; wordd = substr(line,k,col-j+i-1) first = substr(oline,1,k-1) last = substr(oline,K-1+col-j+i) BEFORE = ""||first line = first||wordd||last "LINE_Before .zcsr = noteline(line)" "cursor =" row col LINE = begtr||wordd||endtr||last "line" row "= (line)" "LINE_BEFORE .zcsr = (before)" row = row + 2 /* prepare to place cursor for next line */ "cursor =" row col exit /* xxxxa xx1xx axxxxxx xxxxb xx2xx bxxxxxx xxxxc xx3xx cxxxxxx xxxxd xx4xx dxxxxxx xxxxe xx5xx exxxxxx */