bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Basil L. Contovounesios
Subject: bug#35058: [PATCH] Use display-graphic-p in more cases
Date: Sun, 31 Mar 2019 13:45:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Just a minor comment from me.

Alex <address@hidden> 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





reply via email to

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