Hello,
I'm very fond of the tab-expansion feature. Unfortunately, the result of the expansion is not always what I'd like it to be.
It appears that most interpunction is considered part of a word.
Hence, after the following output
Jim o'Conner says to Josephine: "Hello, my 'special' friend!"
"j<tab>" becomes "Jim"
"jo<tab>" becomes "Josepine:"
"f<tab>" becomes "friend!"
"sp<tab>" becomes "special"
"o<tab>" no expansion
"o'<tab>" no expansion
In the first case, I had expected "Josephine" since this match is both longer and more recent, but that's another story: Apparently, the routine goes backwards linewise but takes the first match per line (since the builtin regexp engine does).
Cases 2 and 3 show how interpunction is unexpectedly (and unwantedly) added.
Case 4 shows that single quotes are treated as interpunction and not part of the word (and so are double quotes).
Cases 5 and 6 show that "o'Conner" is therefore not considered a single word.
IMHO, it would be nicer to exclude *all* interpunction characters from expansion.
On the other hand, especially fantastic names with interpunction characters in the middle are quite common in MUDs. Hence an ever nicer solution would be to ignore (one or more) interpunction characters only at the beginning or end of a word, i.e. to match something like [a-zA-Z0-9][-'"_!(and others)a-zA-Z0-9]*[a-zA-Z0-9]
I don't know what others feel about this, and, hey, maybe the match expression for tab expansion could even be made configurable?
Yours,
hve
|