GNU bug report logs -
#5805
23.1; abbrev-insert does not protext itself with save-excursion
Previous Next
Full log
View this message in rfc822 format
tags 5805 patch
thanks
> I agree with the original poster that a save-excursion is needed in
> abbrev-expand and by making its scope limited (see below) it will not
> interfere with abbrevs that want to change point. The reason I find it
> annoying the way it is now is that some modes (e.g., idlwave) use
> abbrev's extensively to change keywords (e.g. capitalize them). These
> are defined without the leading "\". So if I am any number of lines
> with only whitespace below a keyword defined in this way (e.g. endfor)
> and run expand-abbrev then the point moves even if no visible change
> takes place. This is a VERY common occurrence for me since in viper
> mode changing from insert to vi mode runs expand-abbrev! Placing the
> save-excursion just around the part of abbrev-insert that actually
> expands the abbrev fixes this problem and does not limit abbrev's from
> moving the point (idlwave does this extensively as well and I've
> tested that it is not impacted).
Hmm... sounds like an interesting solution. I'll take a closer look and
get back to you. Thank you.
> Here is the diff against the
> abbrev.el in emacs 23.3 (note that whitespace not adjusted).
Highly appreciated.
Stefan
This bug report was last modified 13 years and 322 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.