emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102596: Merge changes made in Gnus trunk.
Date: Mon, 06 Dec 2010 22:16:10 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102596
author: Gnus developers
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-06 22:16:10 +0000
message:
  Merge changes made in Gnus trunk.
  
  shr.el (shr-render-td): Render td content with shr-descend, so style will be 
applied to <td> too.
   (shr-colorize-region): Colorize region even if we only have a background.
   (shr-tag-body): Fix color and background color inheritance.
   (shr-tag-body): Do not recolorize after shr-generic.
   (shr-tag-font): Let shr-generic colorize via inheritance.
  shr.el (shr-descend): Only colorise something if we have a node that sets 
colors.
  gnus-int.el (gnus-request-thread): Rework to take a header instead of a 
Message-ID to avoid having nnimap depend on gnus-sum.
  shr.el (shr-tag-font): Colorize the region.
   (shr-tag-body): Ditto.
   (shr-tag-font): Actually let the styles be inherited instead of overwriting 
them.
   (shr-tag-font): Get the background color right.
   (shr-tag-style): Ignore all <style> tags for the moment.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-int.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/nnimap.el
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-12-06 03:59:56 +0000
+++ b/lisp/gnus/ChangeLog       2010-12-06 22:16:10 +0000
@@ -1,3 +1,27 @@
+2010-12-06  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * shr.el (shr-tag-font): Colorize the region.
+       (shr-tag-body): Ditto.
+       (shr-tag-font): Actually let the styles be inherited instead of
+       overwriting them.
+       (shr-tag-font): Get the background color right.
+       (shr-tag-style): Ignore all <style> tags for the moment.
+
+       * gnus-int.el (gnus-request-thread): Rework to take a header instead of
+       a Message-ID to avoid having nnimap depend on gnus-sum.
+
+       * shr.el (shr-descend): Only colorize something if we have a node that
+       sets colors.
+
+2010-12-06  Julien Danjou  <address@hidden>
+
+       * shr.el (shr-render-td): Render td content with shr-descend, so style
+       will be applied to <td> too.
+       (shr-colorize-region): Colorize region even if we only have a 
background.
+       (shr-tag-body): Fix color and background color inheritance.
+       Do not recolorize after shr-generic.
+       (shr-tag-font): Let shr-generic colorize via inheritance.
+
 2010-12-06  Katsumi Yamaoka  <address@hidden>
 
        * shr.el (shr-find-fill-point): Don't regard apostrophe as kinsoku-bol.

=== modified file 'lisp/gnus/gnus-int.el'
--- a/lisp/gnus/gnus-int.el     2010-12-05 22:17:34 +0000
+++ b/lisp/gnus/gnus-int.el     2010-12-06 22:16:10 +0000
@@ -503,12 +503,11 @@
             article (gnus-group-real-name group)
             (nth 1 gnus-command-method) buffer)))
 
-(defun gnus-request-thread (id)
-  "Request the headers in the thread containing the article
-specified by Message-ID id."
+(defun gnus-request-thread (header)
+  "Request the headers in the thread containing the article specified by 
HEADER."
   (let ((gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name)))
     (funcall (gnus-get-function gnus-command-method 'request-thread)
-            id)))
+            header)))
 
 (defun gnus-warp-to-article ()
   "Warps from an article in a virtual group to the article in its

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2010-12-05 22:17:34 +0000
+++ b/lisp/gnus/gnus-sum.el     2010-12-06 22:16:10 +0000
@@ -8880,7 +8880,7 @@
           'list gnus-newsgroup-headers
           (if (gnus-check-backend-function
                'request-thread gnus-newsgroup-name)
-              (gnus-request-thread id)
+              (gnus-request-thread (gnus-summary-article-header))
             (let* ((last (if (numberp limit)
                              (min (+ (mail-header-number
                                       (gnus-summary-article-header))

=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el       2010-12-05 22:17:34 +0000
+++ b/lisp/gnus/nnimap.el       2010-12-06 22:16:10 +0000
@@ -47,9 +47,6 @@
 (require 'nnmail)
 (require 'proto-stream)
 
-(eval-when-compile
-  (require 'gnus-sum))
-
 (autoload 'auth-source-forget-user-or-password "auth-source")
 (autoload 'auth-source-user-or-password "auth-source")
 
@@ -1426,9 +1423,10 @@
   (setq nnimap-status-string "Read-only server")
   nil)
 
-(deffoo nnimap-request-thread (id)
-  (let* ((refs (split-string
-               (or (mail-header-references (gnus-summary-article-header))
+(deffoo nnimap-request-thread (header)
+  (let* ((id (mail-header-id header))
+        (refs (split-string
+               (or (mail-header-references header)
                    "")))
         (cmd (let ((value
                     (format

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2010-12-06 03:59:56 +0000
+++ b/lisp/gnus/shr.el  2010-12-06 22:16:10 +0000
@@ -194,19 +194,19 @@
        (style (cdr (assq :style (cdr dom))))
        (shr-stylesheet shr-stylesheet)
        (start (point)))
-    (when (and style
-              (string-match "color" style))
-      (setq shr-stylesheet (nconc (shr-parse-style style)
-                                 shr-stylesheet)))
+    (when style
+      (if (string-match "color" style)
+         (setq shr-stylesheet (nconc (shr-parse-style style)
+                                     shr-stylesheet))
+       (setq style nil)))
     (if (fboundp function)
        (funcall function (cdr dom))
       (shr-generic (cdr dom)))
-    (let ((color (cdr (assq 'color shr-stylesheet)))
-         (background (cdr (assq 'background-color
-                                shr-stylesheet))))
-      (when (and shr-stylesheet
-                (or color background))
-       (shr-colorize-region start (point) color background)))))
+    ;; If style is set, then this node has set the color.
+    (when style
+      (shr-colorize-region start (point)
+                          (cdr (assq 'color shr-stylesheet))
+                          (cdr (assq 'background-color shr-stylesheet))))))
 
 (defun shr-generic (cont)
   (dolist (sub cont)
@@ -586,7 +586,7 @@
                (shr-color-visible bg fg)))))))
 
 (defun shr-colorize-region (start end fg &optional bg)
-  (when fg
+  (when (or fg bg)
     (let ((new-colors (shr-color-check fg bg)))
       (when new-colors
        (shr-put-color start end :foreground (cadr new-colors))
@@ -633,11 +633,14 @@
   (let* ((start (point))
         (fgcolor (cdr (assq :fgcolor cont)))
         (bgcolor (cdr (assq :bgcolor cont)))
-        (shr-stylesheet (list (cons :color fgcolor)
-                              (cons :background-color bgcolor))))
+        (shr-stylesheet (list (cons 'color fgcolor)
+                              (cons 'background-color bgcolor))))
     (shr-generic cont)
     (shr-colorize-region start (point) fgcolor bgcolor)))
 
+(defun shr-tag-style (cont)
+  )
+
 (defun shr-tag-p (cont)
   (shr-ensure-paragraph)
   (shr-indent)
@@ -837,10 +840,14 @@
   (shr-heading cont 'bold 'underline))
 
 (defun shr-tag-font (cont)
-  (let ((start (point))
-        (color (cdr (assq :color cont))))
+  (let* ((start (point))
+         (color (cdr (assq :color cont)))
+         (shr-stylesheet (nconc (list (cons 'color color))
+                               shr-stylesheet)))
     (shr-generic cont)
-    (shr-colorize-region start (point) color)))
+    (when color
+      (shr-colorize-region start (point) color
+                          (cdr (assq 'background-color shr-stylesheet))))))
 
 ;;; Table rendering algorithm.
 
@@ -1040,7 +1047,7 @@
          (insert cache)
        (let ((shr-width width)
              (shr-indentation 0))
-         (shr-generic cont))
+         (shr-descend (cons 'td cont)))
        (delete-region
         (point)
         (+ (point)


reply via email to

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