aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wohler2007-07-11 05:58:45 +0000
committerBill Wohler2007-07-11 05:58:45 +0000
commit1a98ebdffb144238b530c68d7ee0b62b891afcd1 (patch)
tree4414bb131a8cc916a3c5964d21b80e34cbd2cd15
parent948d9b97fc2edc08887a6886d69891a757cdfe09 (diff)
downloademacs-1a98ebdffb144238b530c68d7ee0b62b891afcd1.tar.gz
emacs-1a98ebdffb144238b530c68d7ee0b62b891afcd1.zip
(mh-display-color-cells): Fix on XEmacs 21.5b28. Thanks to Henrique
Martins for the help (closes SF #1749774).
-rw-r--r--lisp/mh-e/ChangeLog5
-rw-r--r--lisp/mh-e/mh-compat.el12
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 @@
12007-07-11 Bill Wohler <wohler@newt.com>
2
3 * mh-compat.el (mh-display-color-cells): Fix on XEmacs 21.5b28.
4 Thanks to Henrique Martins for the help (closes SF #1749774).
5
12007-06-06 Juanma Barranquero <lekktu@gmail.com> 62007-06-06 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * mh-mime.el (mh-mh-directive-present-p): 8 * 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."
77 'cancel-timer 77 'cancel-timer
78 'delete-itimer)) 78 'delete-itimer))
79 79
80(defun-mh mh-display-color-cells display-color-cells (&optional display) 80(defun mh-display-color-cells (&optional display)
81 "Return the number of color cells supported by DISPLAY. 81 "Return the number of color cells supported by DISPLAY.
82This function is used by XEmacs to return 2 when 82This function is used by XEmacs to return 2 when `device-color-cells'
83`device-color-cells' returns nil. This happens when compiling or 83or `display-color-cells' returns nil. This happens when compiling or
84running on a tty and causes errors since `display-color-cells' is 84running on a tty and causes errors since `display-color-cells' is
85expected to return an integer." 85expected to return an integer."
86 (or (device-color-cells display) 2)) 86 (cond ((fboundp 'display-color-cells) ; GNU Emacs, XEmacs 21.5b28
87 (or (display-color-cells display) 2))
88 ((fboundp 'device-color-cells) ; XEmacs 21.4
89 (or (device-color-cells display) 2))
90 (t 2)))
87 91
88(defmacro mh-display-completion-list (completions &optional common-substring) 92(defmacro mh-display-completion-list (completions &optional common-substring)
89 "Display the list of COMPLETIONS. 93 "Display the list of COMPLETIONS.