emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abbrev should preserve case


From: Glenn Morris
Subject: Re: Abbrev should preserve case
Date: Thu, 21 Jun 2007 03:00:25 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

"Davis Herring" wrote:

> Surely you mean do a case-sensitive search first and then
> insensitive? Obviously the sensitive one can't work if the
> insensitive one fails. Then you go on to say that "FOO" could only
> be -different- if there is nothing than which to be different;
> instead we want to say "`FOO' can only expand as upcased `foo' if
> `FOO' is not its own abbrev", right?

It doesn't really matter what I meant if Stefan's already invented
this particular wheel.

I was using "case-insensitive" in a confusing (ie wrong) way. What I
meant was:

You have a word (FOO) in the buffer. Downcase it, and compare with the
abbrev table. If you find a match (foo), return the expansion, with
the existing abbrev case-fiddling applied. This is the same as happens
as present.

If you don't find a match (and if the word is not all lower-case), go
on to try the un-downcased version (FOO) against the abbrev table. If
you find a match, return the expansion.

This would enable existing abbrevs to function as they always have,
and allow for new mixed-case abbrevs so long as they don't conflict
with old-style abbrevs.

If you do it the other way round, you would break backwards
compatibility.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]