Andy Piper <andy(a)xemacs.org> wrote:
> At 12:34 PM 3/30/99 +0200, Hrvoje Niksic wrote:
> >SL Baur <steve(a)xemacs.org> writes:
> >
> >> >> > "Convert MS-DOG style line endings to normal line endings.
> >> >>
> >> >> Will somebody please fix this comment?
> >>
> >> > It is impossible to fix it.
> >>
> >> I thought we had agreed that comments referring to `MS-DOG' were lame
> >> and should be removed from the code.
> >
> >Yes, but we had also agreed not to change packages written by external
> >contributors. Isn't pop3.el such a package?
>
> Not anymore, heh, heh :)
>
> andy
Yes, I suppose it is okay to change that comment, here's what
Stainless Steel Rat <ratinox(a)peorth.gweep.net> (who wrote the code I
think) said to me in the pgnus list about that pop3.el:
<snip>
> No, just not my code. And I've asked them to change the name because it is
> not my code. Either they have not, or you have an older version.
<snip>
So I think it's ok to change the comment.
Here's my patch with the changed comment:
----------------------------cut here-------------------------------
--- e:\bin\XEmacs\xemacs-packages\lisp\mail-lib\pop3.el Mon Mar 08 22:36:12 1999
+++ pop3.el Tue Mar 30 12:46:08 1999
@@ -309,13 +309,17 @@
(funcall pop3-read-passwd prompt))
(defun pop3-clean-region (start end)
- "Convert MS-DOG style line endings to normal line endings.
-Also remove '.' from the beginning of lines."
+ "Convert CRLF line endings to LF line endings.
+Also remove '.' from the beginning of lines.
+Also escape 'From ' after '\n\n' with '>' (for mbox)."
(setq end (set-marker (make-marker) end))
(save-excursion
(goto-char start)
(while (and (< (point) end) (search-forward "\r\n" end t))
(replace-match "\n" t t))
+ (goto-char start)
+ (while (re-search-forward "\n\n\\(From \\)" end t)
+ (replace-match "\n\n>\\1" t nil))
(goto-char start)
(while (and (< (point) end) (re-search-forward "^\\." end t))
(replace-match "" t t)
----------------------------cut here-------------------------------
I still am not sure this is the best place to do it - it makes sense
only for mbox, but it IMHO surely beats losing mail. FWIW.
--
Cheers,
-Dima.