Commit 665ae865 authored by Glenn Morris's avatar Glenn Morris
Browse files

Trivial unrmail fix for empty input files.

* lisp/mail/unrmail.el (unrmail): Give an explicit error if the input
file has no messages.

Fixes: debbugs:10377
parent c869783d
2012-01-06 Glenn Morris <rgm@gnu.org>
* mail/unrmail.el (unrmail): Give an explicit error if the input file
has no messages. (Bug#10377)
* info.el (Info-mode-map): Bind e to end-of-buffer, rather
than Info-edit. (Bug#10385)
......
......@@ -66,7 +66,8 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'."
from to)
(goto-char (point-min))
(search-forward "\n\^_" nil t) ; Skip BABYL header.
(setq from (point))
(if (= (setq from (point)) (point-max))
(error "The input file contains no messages"))
(goto-char (point-max))
(search-backward "\n\^_" from 'mv)
(setq to (point))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment