emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101400: Merge changes made in Gnus t


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101400: Merge changes made in Gnus trunk.
Date: Fri, 10 Sep 2010 00:10:20 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101400 [merge]
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2010-09-10 00:10:20 +0000
message:
  Merge changes made in Gnus trunk.
  
  gnus-html.el (gnus-html-wash-tags): Refactor out the image bit, and don't 
restrict end-tag searches to the end of the line.
  
  Remove pop3-movemail and rename pop3-streaming-movemail to pop3-movemail.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-html.el
  lisp/gnus/mail-source.el
  lisp/gnus/pop3.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-09-09 06:15:13 +0000
+++ b/lisp/gnus/ChangeLog       2010-09-10 00:08:31 +0000
@@ -1,3 +1,13 @@
+2010-09-09  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * mail-source.el (mail-source-fetch-pop): Use pop3-movemail again.
+
+       * pop3.el (pop3-movemail): Removed.
+       (pop3-streaming-movemail): Renamed to pop3-movemail.
+
+       * gnus-html.el (gnus-html-wash-tags): Refactor out the image bit, and
+       don't restrict end-tag searches to the end of the line.
+
 2010-09-09  Katsumi Yamaoka  <address@hidden>
 
        * gnus-start.el (gnus-get-unread-articles): Set the number of unread

=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el    2010-09-09 00:08:06 +0000
+++ b/lisp/gnus/gnus-html.el    2010-09-10 00:07:33 +0000
@@ -128,11 +128,9 @@
   (while (re-search-forward "<a name[^\n>]+>" nil t)
     (replace-match "" t t)))
 
-(defun gnus-html-wash-tags ()
+(defun gnus-html-wash-images ()
   (let (tag parameters string start end images url)
-    (gnus-html-pre-wash)
     (goto-char (point-min))
-
     ;; Search for all the images first.
     (while (re-search-forward "<img_alt \\([^>]*\\)>" nil t)
       (setq parameters (match-string 1)
@@ -210,6 +208,13 @@
                              (set-marker (make-marker) start)
                              (point-marker))
                        images))))))))
+    (when images
+      (gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))))
+
+(defun gnus-html-wash-tags ()
+  (let (tag parameters string start end images url)
+    (gnus-html-pre-wash)
+    (gnus-html-wash-images)
 
     (goto-char (point-min))
     ;; Then do the other tags.
@@ -220,7 +225,7 @@
       (when (plusp (length parameters))
        (set-text-properties 0 (1- (length parameters)) nil parameters))
       (delete-region start (point))
-      (when (search-forward (concat "</" tag ">") (line-end-position) t)
+      (when (search-forward (concat "</" tag ">") nil t)
        (delete-region (match-beginning 0) (match-end 0)))
       (setq end (point))
       (cond
@@ -254,8 +259,6 @@
     ;; off any </pre_int>s that were left over.
     (while (re-search-forward "</pre_int>\\|</internal>" nil t)
       (replace-match "" t t))
-    (when images
-      (gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))
     (mm-url-decode-entities)))
 
 (defun gnus-html-insert-image ()

=== modified file 'lisp/gnus/mail-source.el'
--- a/lisp/gnus/mail-source.el  2010-09-05 23:38:33 +0000
+++ b/lisp/gnus/mail-source.el  2010-09-10 00:08:31 +0000
@@ -34,7 +34,7 @@
   (require 'cl)
   (require 'imap))
 (autoload 'auth-source-user-or-password "auth-source")
-(autoload 'pop3-streaming-movemail "pop3")
+(autoload 'pop3-movemail "pop3")
 (autoload 'pop3-get-message-count "pop3")
 (autoload 'nnheader-cancel-timer "nnheader")
 (require 'mm-util)
@@ -839,11 +839,9 @@
                     (if (eq authentication 'apop) 'apop 'pass))
                    (pop3-stream-type stream))
                (if (or debug-on-quit debug-on-error)
-                   (save-excursion (pop3-streaming-movemail
-                                    mail-source-crash-box))
+                   (save-excursion (pop3-movemail mail-source-crash-box))
                  (condition-case err
-                     (save-excursion (pop3-streaming-movemail
-                                      mail-source-crash-box))
+                     (save-excursion (pop3-movemail mail-source-crash-box))
                    (error
                     ;; We nix out the password in case the error
                     ;; was because of a wrong password being given.

=== modified file 'lisp/gnus/pop3.el'
--- a/lisp/gnus/pop3.el 2010-09-06 02:09:42 +0000
+++ b/lisp/gnus/pop3.el 2010-09-10 00:08:31 +0000
@@ -129,7 +129,8 @@
                       (truncate pop3-read-timeout))
                    1000))))))
 
-(defun pop3-streaming-movemail (file)
+;;;###autoload
+(defun pop3-movemail (file)
   "Transfer contents of a maildrop to the specified FILE.
 Use streaming commands."
   (let* ((process (pop3-open-server pop3-mailhost pop3-port))
@@ -227,44 +228,6 @@
           (pop3-pass process))
          (t (error "Invalid POP3 authentication scheme")))))
 
-(defun pop3-movemail (&optional crashbox)
-  "Transfer contents of a maildrop to the specified CRASHBOX."
-  (or crashbox (setq crashbox (expand-file-name "~/.crashbox")))
-  (let* ((process (pop3-open-server pop3-mailhost pop3-port))
-        (crashbuf (get-buffer-create " *pop3-retr*"))
-        (n 1)
-        message-count
-        message-sizes)
-    (pop3-logon process)
-    (setq message-count (car (pop3-stat process)))
-    (when (> message-count 0)
-      (setq message-sizes (pop3-list process)))
-    (unwind-protect
-       (while (<= n message-count)
-         (message "Retrieving message %d of %d from %s... (%.1fk)"
-                  n message-count pop3-mailhost
-                  (/ (cdr (assoc n message-sizes))
-                     1024.0))
-         (pop3-retr process n crashbuf)
-         (save-excursion
-           (set-buffer crashbuf)
-           (let ((coding-system-for-write 'binary))
-             (write-region (point-min) (point-max) crashbox t 'nomesg))
-           (set-buffer (process-buffer process))
-           (erase-buffer))
-          (unless pop3-leave-mail-on-server
-            (pop3-dele process n))
-         (setq n (+ 1 n))
-         (pop3-accept-process-output process))
-      (when (and pop3-leave-mail-on-server
-                (> n 1))
-       (message "pop3.el doesn't support UIDL.  Setting 
`pop3-leave-mail-on-server'
-to %s might not give the result you'd expect." pop3-leave-mail-on-server)
-       (sit-for 1))
-      (pop3-quit process))
-    (kill-buffer crashbuf))
-  t)
-
 (defun pop3-get-message-count ()
   "Return the number of messages in the maildrop."
   (let* ((process (pop3-open-server pop3-mailhost pop3-port))


reply via email to

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