Gnus development mailing list
 help / color / mirror / Atom feed
From: "Łukasz Stelmach" <lukasz.stelmach@iem.pw.edu.pl>
To: ding@gnus.org
Subject: [PATCH] remove only empty lines
Date: Tue, 20 Sep 2011 21:56:11 +0200	[thread overview]
Message-ID: <87y5xj9eec.fsf%lukasz.stelmach@iem.pw.edu.pl> (raw)

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

Hi.

There is a very little problem with the current implementation of
message-indent-citation function. In a signature like mine, with an
empty line in the middle, the empty line gets removed. The following
patch fixes the problem.

The "(unless (eolp)..." expression is pointless right after (goto-char
(point-max)).

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/message.el b/lisp/message.el
index 1fcd12f..cc8e73b 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -3723,10 +3723,9 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line."
       (message-delete-line))
     ;; Delete blank lines at the end of the buffer.
     (goto-char (point-max))
-    (unless (eolp)
-      (insert "\n"))
-    (while (and (zerop (forward-line -1))
-		(looking-at "$"))
+    (beginning-of-line)
+    (while (and (looking-at "$")
+		(zerop (forward-line -1)))
       (message-delete-line)))
   ;; Do the indentation.
   (if (null message-yank-prefix)
--8<---------------cut here---------------end--------------->8---

-- 
Miłego dnia,
Łukasz Stelmach

... Winogrona w popłochu tulą się do połówek cytryn. Jazda...

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

             reply	other threads:[~2011-09-20 19:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 19:56 Łukasz Stelmach [this message]
2011-09-20 21:13 ` Julien Danjou
2011-09-21 17:40 ` Lars Magne Ingebrigtsen
2011-09-21 19:40   ` Andreas Schwab
2011-09-21 19:54     ` Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87y5xj9eec.fsf%lukasz.stelmach@iem.pw.edu.pl \
    --to=lukasz.stelmach@iem.pw.edu.pl \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).