Search no-error.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 17 Dec 1999 04:02:57 +0000 (04:02 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 17 Dec 1999 04:02:57 +0000 (04:02 +0000)
lisp/ChangeLog
lisp/webmail.el

index 60d9e07..f9cda12 100644 (file)
@@ -1,3 +1,7 @@
+1999-12-16 22:59:22  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * webmail.el (webmail-hotmail-list): Search no-error.
+
 1999-12-15 22:07:15  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * nnwarchive.el: Support nov-is-evil.
index 6b551f5..5770ea7 100644 (file)
 (defun webmail-refresh-redirect ()
   "Redirect refresh url in META."
   (goto-char (point-min))
-  (while (re-search-forward "HTTP-EQUIV=\"Refresh\"[^>]*URL=\\([^\"]+\\)\""
-                           nil t)
+  (while (re-search-forward 
+         "HTTP-EQUIV=\"Refresh\"[^>]*URL=\\([^\"]+\\)\""
+         nil t)
     (let ((url (match-string 1)))
       (erase-buffer)
       (mm-with-unibyte-current-buffer
 (defun webmail-hotmail-list ()
   (let (site url newp)
     (goto-char (point-min))
-    (if (re-search-forward "[0-9]+ messages, [0-9]+ new") 
-       (message "Found %s" (match-string 0)))
+    (if (re-search-forward "[0-9]+ messages, [0-9]+ new" nil t) 
+       (message "Found %s" (match-string 0))
+      (webmail-error "maybe your w3 version is too old"))
     (goto-char (point-min))
     (if (re-search-forward 
         "action=\"https?://\\([^/]+\\)/cgi-bin/HoTMaiL" nil t)
       (widen)
       (insert "\n")
       (setq p (point))
-      (while (re-search-forward "<div>\\|\\(http://[^/]+/cgi-bin/getmsg/\\([^\?]+\\)\?[^\"]*\\)\"" nil t)
+      (while (re-search-forward 
+             "<div>\\|\\(http://[^/]+/cgi-bin/getmsg/\\([^\?]+\\)\?[^\"]*\\)\"" 
+             nil t)
        (if (setq attachment (match-string 1))
            (let ((filename (match-string 2))
                  bufname);; Attachment
       (if id
          (insert "Message-ID: <" id "@hotmail.com>\n"))
       (unless (looking-at "$") 
-       (search-forward "\n\n" nil t)
-       (forward-line -1))
+       (if (search-forward "\n\n" nil t)
+           (forward-line -1)
+         (webmail-error "article@2")))
       (narrow-to-region (point) (point-max))
       (if mime
          (insert "MIME-Version: 1.0\n"
       (if id
          (insert "Message-ID: <" id "@yahoo.com>\n"))
       (unless (looking-at "$") 
-       (search-forward "\n\n" nil t)
-       (forward-line -1))
+       (if (search-forward "\n\n" nil t)
+           (forward-line -1)
+         (webmail-error "article@2")))
       (narrow-to-region (point) (point-max))
       (insert "MIME-Version: 1.0\n"
              (prog1
       (if id
          (insert "Message-ID: <" id "@usa.net>\n"))
       (unless (looking-at "$") 
-       (search-forward "\n\n" nil t)
-       (forward-line -1))
+       (if (search-forward "\n\n" nil t)
+           (forward-line -1)
+         (webmail-error "article@2")))
       (when mime
        (narrow-to-region (point-min) (point))
        (goto-char (point-min))