From: Alexander Gramiak Date: Tue, 2 Apr 2019 17:14:18 +0000 (-0600) Subject: * lisp/frame.el (display-planes): Use logb over truncate + log X-Git-Tag: emacs-27.0.90~3261^2~83 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c16bb5a39b38c48374bc3ad4ca99208ff329d46;p=emacs.git * lisp/frame.el (display-planes): Use logb over truncate + log Suggested by Basil L. Contovounesios: https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-03/msg01052.html --- diff --git a/lisp/frame.el b/lisp/frame.el index aa14e87d7b8..b39891cd142 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2093,7 +2093,7 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." ((eq frame-type 'pc) 4) (t - (truncate (log (length (tty-color-alist)) 2)))))) + (logb (length (tty-color-alist))))))) (declare-function x-display-color-cells "xfns.c" (&optional terminal))