Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] remove only empty lines
@ 2011-09-20 19:56 Łukasz Stelmach
  2011-09-20 21:13 ` Julien Danjou
  2011-09-21 17:40 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Łukasz Stelmach @ 2011-09-20 19:56 UTC (permalink / raw)
  To: ding

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-21 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 19:56 [PATCH] remove only empty lines Łukasz Stelmach
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

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