aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Danjou2011-05-10 13:20:21 +0000
committerKatsumi Yamaoka2011-05-10 13:20:21 +0000
commit296d197b34bfedb9ae5de8ffd615cdc428e60b8a (patch)
tree8b3592e6c213b9c212508e05718d237d144082b9
parent2f142cc515f795f22c96464d97b28a7d8226c578 (diff)
downloademacs-296d197b34bfedb9ae5de8ffd615cdc428e60b8a.tar.gz
emacs-296d197b34bfedb9ae5de8ffd615cdc428e60b8a.zip
shr.el (shr-put-color-1): Do not bug out when old-props is a face symbol and not a list.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/shr.el6
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5f7cd9f546b..657700a6343 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12011-05-10 Julien Danjou <julien@danjou.info>
2
3 * shr.el (shr-put-color-1): Do not bug out when old-props is a face
4 symbol and not a list.
5
12011-05-10 Katsumi Yamaoka <yamaoka@jpl.org> 62011-05-10 Katsumi Yamaoka <yamaoka@jpl.org>
2 7
3 * gnus-art.el (gnus-article-mode): Move binding of 8 * gnus-art.el (gnus-article-mode): Move binding of
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index da27edca6e5..bf5b06ccb56 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -716,7 +716,8 @@ ones, in case fg and bg are nil."
716 716
717(defun shr-put-color-1 (start end type color) 717(defun shr-put-color-1 (start end type color)
718 (let* ((old-props (get-text-property start 'face)) 718 (let* ((old-props (get-text-property start 'face))
719 (do-put (not (memq type old-props))) 719 (do-put (and (listp old-props)
720 (not (memq type old-props))))
720 change) 721 change)
721 (while (< start end) 722 (while (< start end)
722 (setq change (next-single-property-change start 'face nil end)) 723 (setq change (next-single-property-change start 'face nil end))
@@ -724,7 +725,8 @@ ones, in case fg and bg are nil."
724 (put-text-property start change 'face 725 (put-text-property start change 'face
725 (nconc (list type color) old-props))) 726 (nconc (list type color) old-props)))
726 (setq old-props (get-text-property change 'face)) 727 (setq old-props (get-text-property change 'face))
727 (setq do-put (not (memq type old-props))) 728 (setq do-put (and (listp old-props)
729 (not (memq type old-props))))
728 (setq start change)) 730 (setq start change))
729 (when (and do-put 731 (when (and do-put
730 (> end start)) 732 (> end start))