aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-01-06 00:34:47 -0800
committerGlenn Morris2012-01-06 00:34:47 -0800
commit665ae8654babc2e07a08d0b67a60b6e61007dc13 (patch)
tree022130adc62bd24c943a30d1cdbd9da89e516689
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
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/mail/unrmail.el3
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 186860c2b17..ba9886a33e2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-01-06 Glenn Morris <rgm@gnu.org> 12012-01-06 Glenn Morris <rgm@gnu.org>
2 2
3 * mail/unrmail.el (unrmail): Give an explicit error if the input file
4 has no messages. (Bug#10377)
5
3 * info.el (Info-mode-map): Bind e to end-of-buffer, rather 6 * info.el (Info-mode-map): Bind e to end-of-buffer, rather
4 than Info-edit. (Bug#10385) 7 than Info-edit. (Bug#10385)
5 8
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))