[gnus git] branch master updated: n0-17-30-gcc11b74 =1= shr: fix error when face is a face symbol

Julien Danjou <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  cc11b74fe0292f59afb59162d6ee8e381933b50c (commit)
      from  30d1a6c22c8e99ad10a2c08f08ced396ca008939 (commit)


- Log -----------------------------------------------------------------
commit cc11b74fe0292f59afb59162d6ee8e381933b50c
Author: Julien Danjou <[email protected]>
Date:   Tue May 10 14:30:45 2011 +0200

    shr: fix error when face is a face symbol
    
    Signed-off-by: Julien Danjou <[email protected]>

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b9740bb..8e5177b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-10  Julien Danjou  <[email protected]>
+
+	* shr.el (shr-put-color-1): Do not bug out when old-props is a face
+	symbol and not a list.
+
 2011-05-10  Katsumi Yamaoka  <[email protected]>
 
 	* gnus-art.el (gnus-article-mode): Move binding of
diff --git a/lisp/shr.el b/lisp/shr.el
index da27edc..bf5b06c 100644
--- a/lisp/shr.el
+++ b/lisp/shr.el
@@ -716,7 +716,8 @@ ones, in case fg and bg are nil."
 
 (defun shr-put-color-1 (start end type color)
   (let* ((old-props (get-text-property start 'face))
-	 (do-put (not (memq type old-props)))
+	 (do-put (and (listp old-props)
+                      (not (memq type old-props))))
 	 change)
     (while (< start end)
       (setq change (next-single-property-change start 'face nil end))
@@ -724,7 +725,8 @@ ones, in case fg and bg are nil."
 	(put-text-property start change 'face
 			   (nconc (list type color) old-props)))
       (setq old-props (get-text-property change 'face))
-      (setq do-put (not (memq type old-props)))
+      (setq do-put (and (listp old-props)
+                        (not (memq type old-props))))
       (setq start change))
     (when (and do-put
 	       (> end start))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    5 +++++
 lisp/shr.el    |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.