aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorGlenn Morris2012-01-06 00:34:47 -0800
committerGlenn Morris2012-01-06 00:34:47 -0800
commit665ae8654babc2e07a08d0b67a60b6e61007dc13 (patch)
tree022130adc62bd24c943a30d1cdbd9da89e516689 /lisp/mail
parentc869783d91eade5384116740dca6643d8556b142 (diff)
downloademacs-665ae8654babc2e07a08d0b67a60b6e61007dc13.tar.gz
emacs-665ae8654babc2e07a08d0b67a60b6e61007dc13.zip
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
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/unrmail.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index 178b64f1191..929f97746b0 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -66,7 +66,8 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'."
66 from to) 66 from to)
67 (goto-char (point-min)) 67 (goto-char (point-min))
68 (search-forward "\n\^_" nil t) ; Skip BABYL header. 68 (search-forward "\n\^_" nil t) ; Skip BABYL header.
69 (setq from (point)) 69 (if (= (setq from (point)) (point-max))
70 (error "The input file contains no messages"))
70 (goto-char (point-max)) 71 (goto-char (point-max))
71 (search-backward "\n\^_" from 'mv) 72 (search-backward "\n\^_" from 'mv)
72 (setq to (point)) 73 (setq to (point))