[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New mail-related routines

From: Stefan Monnier
Subject: Re: New mail-related routines
Date: Mon, 18 Oct 2004 18:12:51 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> +  (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.

> +     (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.

> +         (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]