Gnus development mailing list
 help / color / mirror / Atom feed
From: William Perry <wmperry@monolith.spry.com>
Subject: Correction to gnus-background-mode for XEmacs
Date: Mon, 22 Apr 1996 08:39:43 -0700	[thread overview]
Message-ID: <199604221539.IAA02435@monolith.spry.com> (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)))


                 reply	other threads:[~1996-04-22 15:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199604221539.IAA02435@monolith.spry.com \
    --to=wmperry@monolith.spry.com \
    --cc=wmperry@spry.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).