* Correction to gnus-background-mode for XEmacs
@ 1996-04-22 15:39 William Perry
0 siblings, 0 replies; only message in thread
From: William Perry @ 1996-04-22 15:39 UTC (permalink / raw)
Since XEmacs doesn't _EVER_ set the background-color frame property,
gnus-background-mode would always guess 'light', which is just
disgusting on a dark background. :)
This patch appears to mostly fix things.
-Bill P.
*** gnus-xmas.el 1996/04/22 15:26:31 1.1
--- gnus-xmas.el 1996/04/22 15:26:43
***************
*** 375,389 ****
(make-color-instance color)))))
(defvar gnus-background-mode
! (let ((bg-resource
! (condition-case ()
! (x-get-resource ".backgroundMode" "BackgroundMode" 'string)
! (error nil)))
! (params (frame-parameters)))
(cond (bg-resource (intern (downcase bg-resource)))
! ((and (assq 'background-color params)
! (< (apply '+ (gnus-x-color-values
! (cdr (assq 'background-color params))))
(/ (apply '+ (gnus-x-color-values "white")) 3)))
'dark)
(t 'light)))
--- 375,392 ----
(make-color-instance color)))))
(defvar gnus-background-mode
! (let* ((bg-resource
! (condition-case ()
! (x-get-resource ".backgroundMode" "BackgroundMode" 'string)
! (error nil)))
! (params (frame-parameters))
! (color (or (assq 'background-color params)
! (color-instance-name
! (specifier-instance
! (face-background 'default))))))
(cond (bg-resource (intern (downcase bg-resource)))
! ((and color
! (< (apply '+ (gnus-x-color-values color))
(/ (apply '+ (gnus-x-color-values "white")) 3)))
'dark)
(t 'light)))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-04-22 15:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-22 15:39 Correction to gnus-background-mode for XEmacs William Perry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).