emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106799: Trivial unrmail fix for empt


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106799: Trivial unrmail fix for empty input files.
Date: Fri, 06 Jan 2012 00:34:47 -0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106799
fixes bug(s): http://debbugs.gnu.org/10377
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2012-01-06 00:34:47 -0800
message:
  Trivial unrmail fix for empty input files.
  
  * lisp/mail/unrmail.el (unrmail): Give an explicit error if the input
  file has no messages.
modified:
  lisp/ChangeLog
  lisp/mail/unrmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-01-06 08:10:22 +0000
+++ b/lisp/ChangeLog    2012-01-06 08:34:47 +0000
@@ -1,5 +1,8 @@
 2012-01-06  Glenn Morris  <address@hidden>
 
+       * 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)
 

=== modified file 'lisp/mail/unrmail.el'
--- a/lisp/mail/unrmail.el      2012-01-05 09:46:05 +0000
+++ b/lisp/mail/unrmail.el      2012-01-06 08:34:47 +0000
@@ -66,7 +66,8 @@
          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))


reply via email to

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