[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New mail-related routines
From: |
Alexander Pohoyda |
Subject: |
Re: New mail-related routines |
Date: |
19 Oct 2004 09:06:44 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Stefan Monnier <address@hidden> writes:
> > + (let ((from (or from (point-min)))
> > + (to (or to (point-max))))
>
> I'd recommend
>
> (unless from (setq from (point-min)))
> (unless to (setq to (point-max)))
>
> it saves a bit of indentation and is marginally more efficient.
Good point, I'll change this everywhere.
> > + (if (or (search-forward (concat "\n" mail-header-separator "\n") to t)
> > + (search-forward "\n\n" to t))
>
> This is less robust than what rfc822-goto-eoh uses, in the case where the
> mail-header-separator is modified.
Yes, you're right. I'll reuse the original regexp from
rfc822-goto-eoh, but I need a function to return the point and don't
move the cursor.
> > + (point)
> > + ;; TODO: Shouldn't we return nil instead?
> > + (message "This entity has no body")
> > + to)))))
>
> I'd argue we should return `to' because the whole thing is the header.
Sorry, I don't clearly understand you here.
Do you agree with returning `to'?
Thank you very much!
--
Alexander Pohoyda <address@hidden>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44
Re: New mail-related routines, Reiner Steib, 2004/10/19
Re: New mail-related routines, Simon Josefsson, 2004/10/24