Function: mh-display-color-cells

mh-display-color-cells is a byte-compiled function defined in mh-compat.el.gz.

Signature

(mh-display-color-cells &optional DISPLAY)

Documentation

Return the number of color cells supported by DISPLAY.

This function is used by XEmacs to return 2 when device-color-cells or display-color-cells returns nil. This happens when compiling or running on a tty and causes errors since display-color-cells is expected to return an integer.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-compat.el.gz
(defun mh-display-color-cells (&optional display)
  "Return the number of color cells supported by DISPLAY.
This function is used by XEmacs to return 2 when `device-color-cells'
or `display-color-cells' returns nil. This happens when compiling or
running on a tty and causes errors since `display-color-cells' is
expected to return an integer."
  (cond ((fboundp 'display-color-cells) ; GNU Emacs, XEmacs 21.5b28
         (or (display-color-cells display) 2))
        ((fboundp 'device-color-cells)  ; XEmacs 21.4
         (or (device-color-cells display) 2))
        (t 2)))