70 |
window-system |
window-system |
71 |
)) |
)) |
72 |
|
|
73 |
|
(defun viper-color-display-p () |
74 |
|
(condition-case nil |
75 |
|
(viper-cond-compile-for-xemacs-or-emacs |
76 |
|
(eq (device-class (selected-device)) 'color) ; xemacs form |
77 |
|
(if (fboundp 'display-color-p) ; emacs form |
78 |
|
(display-color-p) |
79 |
|
(x-display-color-p)) |
80 |
|
) |
81 |
|
(error nil))) |
82 |
|
|
83 |
;; in XEmacs: device-type is tty on tty and stream in batch. |
;; in XEmacs: device-type is tty on tty and stream in batch. |
84 |
(defun viper-window-display-p () |
(defun viper-window-display-p () |
85 |
(and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc))))) |
(and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc))))) |
107 |
(defun viper-has-face-support-p () |
(defun viper-has-face-support-p () |
108 |
(cond ((viper-window-display-p)) |
(cond ((viper-window-display-p)) |
109 |
(viper-force-faces) |
(viper-force-faces) |
110 |
|
((viper-color-display-p)) |
111 |
(viper-emacs-p (memq (viper-device-type) '(pc))) |
(viper-emacs-p (memq (viper-device-type) '(pc))) |
112 |
(viper-xemacs-p (memq (viper-device-type) '(tty pc))))) |
(viper-xemacs-p (memq (viper-device-type) '(tty pc))))) |
113 |
|
|