summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorAlexander Gramiak <agrambot@gmail.com>2019-04-02 11:14:18 -0600
committerAlexander Gramiak <agrambot@gmail.com>2019-04-06 22:43:59 -0600
commit0c16bb5a39b38c48374bc3ad4ca99208ff329d46 (patch)
tree47e27ea9291ad60f12cb0ed132a6084a9487f274 /lisp/frame.el
parentb68405405e5ee4ce7326e6ef32afbde48bafd7fe (diff)
downloademacs-0c16bb5a39b38c48374bc3ad4ca99208ff329d46.tar.gz
* 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
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el2
1 files changed, 1 insertions, 1 deletions
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))