[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: defining words



Carl,

The word-defining routines you created do the job. Excellent!! Thanks. I
haven't encountered any bugs, so you might want to make them a permanent
part of the U2 file.

Your "private" redef routine is similarly helpful. I'm not sure why you've
never made this part of the public release.

To produce the one-key-combination-to-italicize-a-word function I tried to
things:

1) nn=NOXHJM2,.,D,W,o,n,l,y,2,Q2,XHBX,(,M,D, ,+,I,T,) or
  nn=NOXH,JM,(,I,t,a,l,i,c,)

These work well to italicize a word, but (of course) not for removing the
mode if I change my mind or hit the wrong word.

So I tried this:

2) nn=NOXHJM2,.,D,W,o,n,l,y,2,Q2JM2,.,r,e,m,o,d,e,Q2

That is, define the word and then apply the remode routine...

This works well for applying italics or bold or other mode, but it doesn't
*remove* italics or other "positive" mode from a word.

****** begin problem ******

Using this sentence --- "This is a test of the system."

Apply DWonly2+remode to the word "test", and choose "italic" (#9).

Result: "This is a ≪MDIT≫test≪MDNM≫ of the system." This expected &
desired.

Now, with the cursor on "test", apply DWonly2+remode a second time and
choose Normal (#1).

Result: "This is a ≪MDIT≫test of the system."

Remode itself would remove the italics properly as long as the word is not
already defined.

******** end problem ******

I haven't had time to look at the XPL code yet (or, more precise, I haven't
had time to figure out what the code is doing).  I'm pressing it into a use
for which it was not designed, so I doubt that this is a bug. The problem
arises when trying to remove modes from a word already defined.

Myron