[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5805: 23.1; abbrev-insert does not protext itself with save-excursio
From: |
Stefan Monnier |
Subject: |
bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion |
Date: |
Sat, 10 Apr 2010 15:10:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Create a global abbrev, abbrv => abbrev
> Type the following, ^ indicating point location.
> abbrv ()
> ^
> Then press C-x ' to expand the abbrev on the line.
> abbrev ()
> ^
> Observe that point ^ is now before the ()s.
Right. The question now is: why is that a problem?
I ask because for some abbrevs, moving point isa feature, e.g. an abbrev
that uses skeletons to expand
begi
^
into
\begin{itemize} \end{itemize}
^
so maybe the problem is that your code makes unwarranted assumptions
about what abbrevs can do, or maybe your code knows that it won't
encounter such abbreviations or that it wouldn't care about their
point-placement feature, so it could/should use save-excursion.
> ;; Emacs 23 has a lisp implementation for abbrevs.
BTW, the problem is not that the implementation is in Lisp, but that it
behaves differently.
Stefan
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion, Chong Yidong, 2010/04/10
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion, Maguire, Andrew (GE Infra, Energy), 2010/04/10
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion,
Stefan Monnier <=
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion, Maguire, Andrew (GE Infra, Energy), 2010/04/12
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion, Stefan Monnier, 2010/04/12
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion, Maguire, Andrew (GE Infra, Energy), 2010/04/12
- bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion, Stefan Monnier, 2010/04/12