I believe you're running into behavior I have also seen. Consider the following scenario.
In an otherwise empty buffer, enter the following three non-blank lines (blanks here for readability):
Run the following tests, each with the cursor at the end of the third line. (It does not matter if there is a newline after the third line.)
Firstly, invoke M-/ and what you will get is Test2string.
Secondly, delete the third line and replace it with "TEST1" before invoking M-/ and what you will get is TEST1STRING.
Thirdly, delete the third line and replace it with "test2" before invoking M-/ and what you will get is test2string.
I don't what this case-matching behavior is called, but it catches me occasionally too....
Can you be more specific. What is the guarantee that you haven't typed
M-l, M-u or M-c?
> I have not customized dabrrev ... I believe I run into this
> accidentally when I type in some control/alt combinations
> On Thu, Jul 19, 2012 at 7:34 PM, Jambunathan K <
> kjambunathan@gmai...> wrote:
> C K Kashyap <ckkashyap@gmai...> writes:
> > Hi,
> > I noticed that at times when I do a M-/ and try to complete a
> > that already exists in the buffer (I assume, this is what I
> need to
> > do if I need to do what I did using C-p or C-n on vi), the word
> > completion happens but with weird casing. Sometime all caps
> etc. I
> > wonder if there is some setting I need to do when I get into
> > situation.
> Have you customized dabrrev?
> See (info "(emacs) Dabbrev Customization")
> > Regards,
> > Kashyap