diff options
author | Bill Wohler <wohler@newt.com> | 2007-07-11 05:58:45 +0000 |
---|---|---|
committer | Bill Wohler <wohler@newt.com> | 2007-07-11 05:58:45 +0000 |
commit | 1a98ebdffb144238b530c68d7ee0b62b891afcd1 (patch) | |
tree | 4414bb131a8cc916a3c5964d21b80e34cbd2cd15 /lisp/mh-e | |
parent | 948d9b97fc2edc08887a6886d69891a757cdfe09 (diff) | |
download | emacs-1a98ebdffb144238b530c68d7ee0b62b891afcd1.tar.gz |
(mh-display-color-cells): Fix on XEmacs 21.5b28. Thanks to Henrique
Martins for the help (closes SF #1749774).
Diffstat (limited to 'lisp/mh-e')
-rw-r--r-- | lisp/mh-e/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/mh-e/mh-compat.el | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 3d3a08e0528..97ccda6e048 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2007-07-11 Bill Wohler <wohler@newt.com> + + * mh-compat.el (mh-display-color-cells): Fix on XEmacs 21.5b28. + Thanks to Henrique Martins for the help (closes SF #1749774). + 2007-06-06 Juanma Barranquero <lekktu@gmail.com> * mh-mime.el (mh-mh-directive-present-p): diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 2f57e1763ab..a1382a8298e 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -77,13 +77,17 @@ introduced in Emacs 22." 'cancel-timer 'delete-itimer)) -(defun-mh mh-display-color-cells display-color-cells (&optional display) +(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' returns nil. This happens when compiling or +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." - (or (device-color-cells display) 2)) + (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))) (defmacro mh-display-completion-list (completions &optional common-substring) "Display the list of COMPLETIONS. |