unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Allen Li <vianchielfaura@gmail.com>
To: 25767@debbugs.gnu.org
Subject: bug#25767: 25.1.91; abbrev-prefix-mark expansion inserts newline
Date: Fri, 17 Feb 2017 14:15:07 -0800	[thread overview]
Message-ID: <CAJr1M6dT5eA4rA4WMo-dKdF0+1rHACaC4b5f7tqkgeN3q2aoig@mail.gmail.com> (raw)
In-Reply-To: <CAJr1M6dpjtXXtJ146CTrfHou9Ckk71gw3KKFVjiL=pO4hoMh+w@mail.gmail.com>

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.)





  reply	other threads:[~2017-02-17 22:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17  0:49 bug#25767: 25.1.91; abbrev-prefix-mark expansion inserts newline Allen Li
2017-02-17 22:15 ` Allen Li [this message]
2017-02-18  8:09   ` Eli Zaretskii
2017-02-24  5:34 ` bug#25767: [PATCH] " Allen Li
2017-02-24 14:26   ` Noam Postavsky
2017-02-25  4:58     ` Allen Li
2017-02-28  4:47       ` npostavs
2017-03-02  6:35         ` Allen Li
2017-03-03  0:06   ` npostavs
2017-03-03  8:39     ` Eli Zaretskii
2017-03-03 10:34       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJr1M6dT5eA4rA4WMo-dKdF0+1rHACaC4b5f7tqkgeN3q2aoig@mail.gmail.com \
    --to=vianchielfaura@gmail.com \
    --cc=25767@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).