]> code.delx.au - gnu-emacs/commitdiff
* net/shr.el (shr-colorize-region):
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 29 Sep 2015 02:01:50 +0000 (02:01 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 29 Sep 2015 02:01:50 +0000 (02:01 +0000)
Don't do it on a system not supporting 256 above colors (bug#21557).

lisp/net/shr.el

index fb450e8a95e666caa61a898c939ad5fe37068035..ebc8ab3327f7503ac7d22bf24713980f75fcf9b5 100644 (file)
@@ -1042,7 +1042,7 @@ ones, in case fg and bg are nil."
                (shr-color-visible bg fg)))))))
 
 (defun shr-colorize-region (start end fg &optional bg)
-  (when (or fg bg)
+  (when (and (or fg bg) (>= (display-color-cells) 256))
     (let ((new-colors (shr-color-check fg bg)))
       (when new-colors
        (when fg