GNU bug report logs - #25767
25.1.91; abbrev-prefix-mark expansion inserts newline

Previous Next

Package: emacs;

Reported by: Allen Li <vianchielfaura <at> gmail.com>

Date: Fri, 17 Feb 2017 00:50:01 UTC

Severity: normal

Tags: fixed

Found in version 25.1.91

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Allen Li <vianchielfaura <at> gmail.com>
To: 25767 <at> debbugs.gnu.org
Subject: bug#25767: 25.1.91; abbrev-prefix-mark expansion inserts newline
Date: Fri, 17 Feb 2017 14:15:07 -0800
The behavior was bugging me so I looked into it.  The root cause is
that `abbrev--before-point' does not adjust `pos' to account for when
it deletes the "-" left by abbrev-prefix-mark.  Therefore, when
`abbrev-before-point' goes to restore point, it moves point one
character too far forward (in the repro example, moving past the
newline).

The fix is really easy, but I haven't contributed to Emacs before, so
I don't know the proper procedure.  (Also, the existing code really
bugs me; I would tear it out and replace it with (with-excursion) if
Emacs was my pet project that millions of users aren't depending on.)




This bug report was last modified 8 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.