emacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-commit] emacs/lisp/mh-e mh-compat.el


From: Bill Wohler
Subject: [Emacs-commit] emacs/lisp/mh-e mh-compat.el
Date: Wed, 11 Jul 2007 05:58:31 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Bill Wohler <wohler>    07/07/11 05:58:31

Modified files:
        lisp/mh-e      : mh-compat.el 

Log message:
        (mh-display-color-cells): Fix on XEmacs 21.5b28. Thanks to Henrique
        Martins for the help (closes SF #1749774).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mh-e/mh-compat.el?cvsroot=emacs&r1=1.20&r2=1.21

Patches:
Index: mh-compat.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mh-e/mh-compat.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- mh-compat.el        21 Jan 2007 03:00:56 -0000      1.20
+++ mh-compat.el        11 Jul 2007 05:58:31 -0000      1.21
@@ -77,13 +77,17 @@
       '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."
+  (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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]