Commit b9584630 authored by Ulrik Haugen's avatar Ulrik Haugen
Browse files

applied patch from Per Starbäck regarding definition of device-class

parent 56356464
2000-12-17 Ulrik Haugen <>
* utilities.el: applied patch from Per Starbck, device-class
isn't defined if it doesn't exist, lyskom-device-class is. Caller
changed. (Se text 5867166 in LysLysKOM.)
2000-12-12 David Byers <>
* Release av 0.46.1-BETA-4
......@@ -677,22 +677,19 @@ The order of the list a is kept."
(lyskom-external-function display-grayscale-p)
(if (fboundp 'device-class)
(setq lyskom-compatibility-definitions
(cons 'device-class lyskom-compatibility-definitions))
(if (and (fboundp 'display-color-p) (fboundp 'display-grayscale-p))
(cond ((fboundp 'device-class) ; XEmacsism
(defalias 'lyskom-device-class 'device-class))
((and (fboundp 'display-color-p) (fboundp 'display-grayscale-p))
;; Emacs 21 can use color even when not running under
;; X-windows. Note that display-grayscale-p can be false when
;; using a color display! This happens when running on a
;; classic Linux tty console.
(defun device-class (&optional device)
(defun lyskom-device-class (&optional device)
(cond ((display-color-p device) 'color)
((display-grayscale-p device) 'grayscale)
(t 'mono)))
;; This works in Emacs 20 and earlier.
(defun device-class (&optional device)
(t 'mono))))
(t ;; This works in Emacs 20 and earlier.
(defun lyskom-device-class (&optional device)
(condition-case nil
(if (x-display-grayscale-p device)
(if (x-display-color-p device)
......@@ -701,7 +698,6 @@ The order of the list a is kept."
(error 'mono))))))
(lyskom-provide-function frame-property (frame property &optional default)
(or (cdr (assq property (frame-parameters frame)))
......@@ -909,7 +905,7 @@ also reads the proper X resources."
(unless kom-default-face-scheme
(setq kom-default-face-scheme
(condition-case nil
(cond ((eq (device-class) 'mono) 'monochrome)
(cond ((eq (lyskom-device-class) 'mono) 'monochrome)
((eq (lyskom-background-mode) 'dark)
(t 'default))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment