# HG changeset patch # User Bill Wohler # Date 1141079107 0 # Node ID 4eb7009c53f4588d0c92e117c4f49ea686b47495 # Parent ee54b3a792ff7f5e38ced457e7379c1650192d85 * 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. diff -r ee54b3a792ff -r 4eb7009c53f4 lisp/mh-e/ChangeLog --- a/lisp/mh-e/ChangeLog Mon Feb 27 22:10:43 2006 +0000 +++ b/lisp/mh-e/ChangeLog Mon Feb 27 22:25:07 2006 +0000 @@ -1,3 +1,11 @@ +2006-02-27 Bill Wohler + + * 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 * mh-e.el (mh-invisible-header-fields-internal): Added entry diff -r ee54b3a792ff -r 4eb7009c53f4 lisp/mh-e/mh-compat.el --- a/lisp/mh-e/mh-compat.el Mon Feb 27 22:10:43 2006 +0000 +++ b/lisp/mh-e/mh-compat.el Mon Feb 27 22:25:07 2006 +0000 @@ -79,11 +79,11 @@ (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. diff -r ee54b3a792ff -r 4eb7009c53f4 lisp/mh-e/mh-e.el --- a/lisp/mh-e/mh-e.el Mon Feb 27 22:10:43 2006 +0000 +++ b/lisp/mh-e/mh-e.el Mon Feb 27 22:25:07 2006 +0000 @@ -101,12 +101,7 @@ (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))