Path: utzoo!utgpu!watmath!clyde!att!rutgers!cmcl2!nrl-cmf!ukma!gatech!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.editors Subject: Re: Editor extensibility Message-ID: <4121@enea.se> Date: 1 Dec 88 22:16:04 GMT Organization: ENEA DATA AB, Sweden Lines: 36 Jim Patterson (jimp@cognos.UUCP) writes: >I wrote: >>If I do an case-insentive >>search I want the pairs ]} [{ \| to be equivalent just as Aa Bb etc. >>Simply because they are letters on my screen. > >GNU Emacs supports essentially this ability via its syntax table. The >syntax table allows the printable characters to be classified on a >... >To do what you want, you simply need to define '[' and '{' as >opening delimiters, and ']' and '}' as closing delimiters. (They are >already in most modes). You can then use '\s(' to match either [ or { >and '\s)' for ] or }. When I read this I first said to myself "he hasn't understood the problem". Then I looked at it a second time and started to suspect that I was the one the who didn't grasp the solution. You mean that if I type "fiskeb}t" (Eng. fishing boat) at the search prompt, my search routine should translate it to "fiskeb\s)t" before I call (re-search-forward)? I wouldn't say that GNU-Emacs really support this, it's a very obscure trick. And now for the tricky part? How to incorporate \| into this? Preferably also *' and ^~. The problem goes even worse if you want accented letters being equivavlent. I don't know if this is really desired, but I seldom make searches in French texts. In case-insensitive mode TPU concsiders all varieties of "A" (accented, dotted, with ring, upper- and lowercase, I'm speaking eight-bit mode here) as equivalent. Maybe nice for the Frenchmen. For me it is utter folly. What is needed is some mechanism to tell that these characters are equivalent in non-exact searches. -- Erland Sommarskog ENEA Data, Stockholm sommar@enea.se "Frequently, unexpected errors are entirely unpredictable" - Digital Equipment