Subject: Re: bug#35058: [PATCH] Use display-graphic-p in more cases

From: "Basil L. Contovounesios" <[email-masked]>
Date: Sun, 31 Mar 2019 13:45:50 +0100

Just a minor comment from me.

Alex <[email-masked]> writes:

> diff --git a/lisp/frame.el b/lisp/frame.el
> index 6cb1247372..f5ad3152a0 100644
> --- a/lisp/frame.el
> +++ b/lisp/frame.el
> @@ -2078,12 +2069,12 @@ display-planes
>  If DISPLAY is omitted or nil, it defaults to the selected frame's display."
>    (let ((frame-type (framep-on-display display)))
>      (cond
> -     ((memq frame-type '(x w32 ns))
> -      (x-display-planes display))
>       ((eq frame-type 'pc)
>        4)
> +     ((memq frame-type '(nil t))
> +      (truncate (log (length (tty-color-alist)) 2)))
>       (t
> -      (truncate (log (length (tty-color-alist)) 2))))))
> +      (x-display-planes display)))))
>  
>  (declare-function x-display-color-cells "xfns.c" (&optional terminal))

I suggest also changing (truncate (log (length (tty-color-alist)) 2))
to (logb (length (tty-color-alist))).

Thanks,

-- 
Basil