+2006-02-27 Bill Wohler <wohler@newt.com>
+
+ * mh-compat.el (mh-display-color-cells): Return 2 if
+ device-color-cells returns nil (closes SF #1436924).
+
+ * mh-e.el (mh-compiling-flag): Delete. No longer needed by
+ mh-display-color-cells.
+
2006-02-21 Eric Ding <ericding@alum.mit.edu>
* mh-e.el (mh-invisible-header-fields-internal): Added entry
(mh-defun-compat mh-display-color-cells display-color-cells (&optional display)
"Return the number of color cells supported by DISPLAY.
-This function is used by XEmacs to always return 0 when compiling
-to avoid compiling errors. Otherwise uses `device-color-cells'."
- (if mh-compiling-flag
- 0
- (device-color-cells display)))
+This function is used by XEmacs to return 2 when
+`device-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."
+ (or (device-color-cells display) 2))
(defmacro mh-display-completion-list (completions &optional common-substring)
"Display the list of COMPLETIONS.
(eval-and-compile
(defvar mh-xemacs-flag (featurep 'xemacs)
- "Non-nil means the current Emacs is XEmacs.")
- (defvar mh-compiling-flag nil
- "Non-nil means we're compiling."))
-
-(eval-when (compile)
- (setq mh-compiling-flag t))
+ "Non-nil means the current Emacs is XEmacs."))
(mh-do-in-xemacs
(require 'mh-xemacs))