unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: Mark Karpov <markkarpov@openmailbox.org>, 25157@debbugs.gnu.org
Subject: bug#25157: 26.0.50; whitespace-cleanup does not remove single trailing empty line anymore
Date: Thu, 22 Dec 2016 12:53:37 +0000	[thread overview]
Message-ID: <CAOnWdogZN9+D0GjW2i=Y13FrhnXAKA6fD+QOQM5xh5LgW923ig@mail.gmail.com> (raw)
In-Reply-To: <8760mcbta2.fsf@users.sourceforge.net>

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

On Dec 22, 2016 2:17 AM, <npostavs@users.sourceforge.net> wrote:
>
> Reuben Thomas <rrt@sc3d.org> writes:
>
> >(I was trying to make it match ALL the whitespace at the end of the
> >buffer, as you probably realised.)
>
> Oh, I thought that might have been the case.  It explains why you were
> going through all that trouble with the regexp.
>
> >
> > The only thing I'd change in your match is, as in mine, remove the
FIXME after save-match-data.​
>
>     (whitespace-cleanup): Remove a FIXME: the reason for save-match-data
>     is the call of re-search-forward.
>
> I'm not sure this is a sufficient explanation of why save-match-data is
> needed.  Usually in Emacs the caller is responsible for saving the match
> data, if it needs to.  I don't really see the need here.

Can it be removed then? The only perhaps unexpected thing I can think of is
that whitespace-cleanup can be called from a hook, such as save-file-hook,
but that doesn't seem to matter.

[-- Attachment #2: Type: text/html, Size: 1275 bytes --]

  reply	other threads:[~2016-12-22 12:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10 14:41 bug#25157: 26.0.50; whitespace-cleanup does not remove single trailing empty line anymore Mark Karpov
2016-12-20  4:36 ` npostavs
2016-12-20 18:37   ` Reuben Thomas
2016-12-21  0:51     ` Reuben Thomas
2016-12-21  4:07     ` npostavs
2016-12-21 11:07       ` Reuben Thomas
2016-12-22  2:18         ` npostavs
2016-12-22 12:53           ` Reuben Thomas [this message]
2016-12-23  0:03             ` npostavs
2016-12-23 10:44               ` Reuben Thomas
2016-12-24 15:34                 ` npostavs
2016-12-26 22:37                   ` Reuben Thomas

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='CAOnWdogZN9+D0GjW2i=Y13FrhnXAKA6fD+QOQM5xh5LgW923ig@mail.gmail.com' \
    --to=rrt@sc3d.org \
    --cc=25157@debbugs.gnu.org \
    --cc=markkarpov@openmailbox.org \
    --cc=npostavs@users.sourceforge.net \
    /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).