================================================================
Dear Bug Team!
I've been playing with starting an xemacs on a tty and then using
make-frame-on-display to create an X11 one, but have been running into
some fun coloration issues.
If I explicitly specify colors as attached to frame-types, things work
well:
'(modeline ((((type x)) (:background "lightblue" :foreground
"black"))
(((type tty)) (:background "brightblue" :foreground "white")))
t)
If I rely upon frame-background-type, the right thing does not
happen. The colors are those of the original mode. (i.e. if the
first frame is 'tty-frame (and I generally use a black background in a
terminal) the background-type is dark.. My 'x-frames are light
colored, and have a light background type.
(get-frame-background-mode (get-frame-for-buffer (current-buffer)))
returns appropriately on each evaluation even if the same buffer is
displayed in two frames.
A simple example of a mode that relys on light/dark is hyper-appros.
'((((class color) (background light))
(:foreground "darkred"))
(((class color) (background dark))
(:foreground "gray90")))
But sadly, it doesn't render the colors properly.
HOW TO REPLICATE:
xemacs -nw -q
(custom-set-faces
'(default ((((type x)) (:foreground "black" :background "white"))
(((type tty)) (:foreground "white" :background "black")))
t)
)
M-x make-frame-on-display :0.0
M-x hyper-appropos foo
coloration in the Hyper-Appropos buffer is wrong, it's assuming a dark
background instead of a light one.
GUESS:
It looks like the light/dark background REQ specifier (see
defface) isn't matching properly.
If I explicitly set frame-background-mode to light in a frame, and then
execute a custom-set-faces...
(custom-set-faces
'(default ((((background light)) (:foreground "black" :background
"white"))
(((background dark)) (:foreground "white" :background
"red" ))) t))
... _all_ frames turn red, ignoring the background mode.
Thanks!
(I'm happy to poke at this more, if someone can suggest where to poke.)
-R
================================================================
System Info to help track down your bug:
---------------------------------------
uname -a: Linux bear 2.4.20-9 #1 Wed Apr 2 13:42:50 EST 2003 i686 i686 i386 GNU/Linux
./configure '--prefix=/pkg/xemacs-21.4.13' '--cflags=-O3 -march=pentium4
-mfpmath=sse -malign-double -mmmx -msse -msse2 -maccumulate-outgoing-args
-minline-all-stringops -momit-leaf-frame-pointer' '--with-mule'
XEmacs 21.4.13 "Rational FORTRAN" configured for `i686-pc-linux'.
Compilation / Installation:
Source code location: /pkg/src/xemacs-21.4.13
Installation prefix: /pkg/xemacs-21.4.13
Operating system description file: `s/linux.h'
Machine description file: `m/intel386.h'
Compiler: gcc -O3 -march=pentium4 -mfpmath=sse -malign-double
-mmmx -msse -msse2 -maccumulate-outgoing-args -minline-all-stringops
-momit-leaf-frame-pointer
Relocating allocator for buffers: no
GNU version of malloc: yes
- Using Doug Lea's new malloc from the GNU C Library.
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Using Lucid menubars.
Using Lucid scrollbars.
Using Motif dialog boxes.
Using Motif native widgets.
TTY:
Compiling in support for ncurses.
Compiling in support for GPM (General Purpose Mouse).
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Sound:
Compiling in support for sound (native).
Databases:
Compiling in support for Berkeley database.
Compiling in support for LDAP.
Internationalization:
Compiling in support for Mule (multi-lingual Emacs).
Compiling in support for XIM (X11R5+ I18N input method).
- Using Motif to provide XIM support.
Mail:
Compiling in support for "dot-locking" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Using the new portable dumper.
Load-Path Lisp Shadows:
----------------------
(/home/rspier/lib/emacs/align
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/edit-utils/align
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/ecrypto/md4
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/md4
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/ecrypto/sha1
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sha1
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/ecrypto/md5
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/md5
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/ecrypto/hex-util
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/hex-util
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/ecrypto/sha1-el
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sha1-el
/home/rspier/lib/emacs/gpg
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/gnus/gpg
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/smtpmail
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/mail-lib/smtpmail
/home/rspier/lib/emacs/expect
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/mailcrypt/expect
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sasl
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/sasl
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sasl-scram
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/sasl-scram
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sasl-ntlm
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/sasl-ntlm
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sasl-digest
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/sasl-digest
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/sasl-cram
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/sasl-cram
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/ntlm
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/ntlm
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/hmac-sha1
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/hmac-sha1
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/hmac-md5
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/hmac-md5
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/hmac-def
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/sasl/hmac-def
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/gnus/smime
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/semi/smime
/home/rspier/lib/emacs/filladapt
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/text-modes/filladapt
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/semi/signature
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/tm/signature
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/semi/mime-setup
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/tm/mime-setup
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/mel
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/tm/mel
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/mel-u
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/tm/mel-u
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/mel-q
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/tm/mel-q
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/flim/mel-g
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/tm/mel-g
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/gnus/utf7
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/wl/utf7
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/apel/timezone
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/xemacs-base/timezone
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/apel/alist
/pkg/xemacs/lib/xemacs-21.4.13/lisp/alist
/pkg/xemacs/lib/xemacs/xemacs-packages/lisp/build/build-report
/pkg/xemacs/lib/xemacs-21.4.13/lisp/build-report)
Installed XEmacs Packages:
-------------------------
((zenirc:version 1.13 :type regular)
(xslt-process :version 1.11 :type regular)
(xslide :version 1.08 :type regular)
(xemacs-devel :version 1.58 :type single-file)
(xemacs-base :version 1.81 :type regular)
(x-symbol :version 1.05 :type regular)
(w3 :version 1.28 :type regular)
(vm :version 7.17 :type regular)
(viper :version 1.36 :type regular)
(view-process :version 1.12 :type regular)
(vc-cc :version 1.21 :type regular)
(vc :version 1.37 :type regular)
(tramp :version 1.16 :type regular)
(tooltalk :version 1.14 :type regular)
(tm :version 1.36 :type regular)
(time :version 1.13 :type regular)
(textools :version 1.14 :type regular)
(text-modes :version 1.66 :type single-file)
(texinfo :version 1.24 :type regular)
(supercite :version 1.19 :type regular)
(strokes :version 1.09 :type regular)
(speedbar :version 1.26 :type regular)
(sounds-wav :version 1.11 :type regular)
(sounds-au :version 1.11 :type regular)
(slider :version 1.14 :type regular)
(sieve :version 1.13 :type regular)
(sh-script :version 1.17 :type regular)
(sgml :version 1.09 :type regular)
(semantic :version 1.17 :type regular)
(scheme :version 1.13 :type regular)
(sasl :version 1.13 :type regular)
(ruby-modes :version 1.01 :type regular)
(rmail :version 1.13 :type regular)
(reftex :version 1.32 :type regular)
(python-modes :version 1.02 :type single-file)
(psgml-dtds :version 1.02 :type regular)
(psgml :version 1.41 :type regular)
(ps-print :version 1.08 :type regular)
(prog-modes
:version
1
.89
:type
single-file)
(perl-modes :version 1.04 :type single-file)
(pcomplete :version 1.02 :type regular)
(pcl-cvs :version 1.64 :type regular)
(pc :version 1.25 :type single-file)
(os-utils :version 1.32 :type single-file)
(oo-browser :version 1.03 :type regular)
(net-utils :version 1.32 :type single-file)
(mule-ucs :version 1.04 :type regular)
(mule-base :version 1.43 :type regular)
(mmm-mode :version 1.0 :type regular)
(misc-games :version 1.17 :type single-file)
(mine :version 1.15 :type regular)
(mh-e :version 1.25 :type regular)
(mew :version 1.17 :type regular)
(mailcrypt :version 2.12 :type regular)
(mail-lib :version 1.62 :type regular)
(lookup :version 1.13 :type regular)
(locale :version 1.2 :type regular)
(liece :version 1.12 :type regular)
(leim :version 1.21 :type regular)
(latin-unity :version 1.07 :type regular)
(jde :version 1.45 :type regular)
(ispell :version 1.24 :type regular)
(ilisp :version 1.32 :type regular)
(igrep :version 1.11 :type regular)
(ibuffer :version 1.08 :type regular)
(hm--html-menus :version 1.21 :type regular)
(gnus :version 1.71 :type regular)
(gnats :version 1.15 :type regular)
(games :version 1.14 :type regular)
(fsf-compat :version 1.12 :type single-file)
(frame-icon :version 1.1 :type regular)
(forms :version 1.14 :type regular)
(footnote :version 1.15 :type regular)
(eudc :version 1.38 :type regular)
(eterm :version 1.14 :type regular)
(ess :version 1.04 :type regular)
(eshell :version 1.05 :type regular)
(emerge :version 1.1 :type regular)
(elib :version 1.1 :type single-file)
(eieio :version 1.04 :type regular)
(efs :version 1.31 :type regular)
(edt :version 1.12 :type regular)
(edit-utils :version 2.07 :type single-file)
(ediff :version 1.47 :type regular)
(edebug :version 1.19 :type regular)
(ecrypto :version 0.13 :type regular)
(ecb :version 1.12 :type regular)
(docbookide :version 0.06 :type regular)
(dired :version 1.14 :type regular)
(dictionary :version 1.12 :type regular)
(debug :version 1.16 :type regular)
(cookie :version 1.14 :type regular)
(cc-mode :version 1.4 :type regular)
(calendar :version 1.21 :type regular)
(calc :version 1.23 :type regular)
(c-support :version 1.17 :type single-file)
(build :version 1.1 :type regular)
(bbdb :version 1.23 :type regular)
(auctex :version 1.35 :type regular))
Installed Modules:
-----------------
Features:
--------
(xemacsbug shadow env send-pr dabbrev w3m-form w3m w3m-hist w3m-xmas
w3m-image w3m-proc w3m-util smtp sasl sasl-anonymous sasl-login
sasl-plain ispell-highlight ispell mel-q-ccl wl-score elmo-internal
elmo-imap4 elmo-net elmo-dop elmo-cache elmo-map modb-legacy wl-mime
mime-play filename mime-setup mail-mime-setup semi-setup elmo-flag
elmo-localdir my-wl vm-multdom fmailutils vm-message mime-w3m font
browse-url mime-edit eword-encode pgg-parse pccl pccl-20 pgg-def
signature mail-utils wl-demo wl-draft wl-template wl-news wl-address
wl-thread wl-action wl-summary ps-print lpr wl-refile wl-message
elmo-mime mmelmo-buffer mmelmo-imap mime-view mime-conf calist
semi-def mmimap mime-parse mmbuffer mmgeneric wl-highlight elmo-multi
wl-folder wl wl-xmas wl-util pp wl-vars wl-version elmo elmo-database
elmo-msgdb modb modb-generic modb-entity mime elmo-util emu invisible
inv-xemacs utf7 mm-util mail-prsvr eword-decode mel mime-def alist
std11 mcharset mcs-20 mcs-xm mcs-xmu poem poem-xm pces pces-xfc
pces-20 broken pces-xm pcustom elmo-date timezone path-util elmo-vars
byte-optimize bytecomp byte-compile advice advice-preload poe-xemacs
timer poe elmo-version pym static apel-ver product luna allout outline
disp-table eudc cus-edit cus-load eudc-vars overlay wid-edit font-lock
cus-face vc-hooks filladapt mail-abbrevs sendmail rfc822 mwheel
zenirc-autoloads xslt-process-autoloads xslide-autoloads
xemacs-devel-autoloads xemacs-base-autoloads x-symbol-autoloads
wl-autoloads w3-autoloads vm-autoloads viper-autoloads
view-process-autoloads vc-cc-autoloads vc-autoloads tramp-autoloads
tooltalk-autoloads tm-autoloads time-autoloads textools-autoloads
text-modes-autoloads texinfo-autoloads supercite-autoloads
strokes-autoloads speedbar-autoloads sounds-wav-autoloads
sounds-au-autoloads slider-autoloads sieve-autoloads
sh-script-autoloads sgml-autoloads semi-autoloads semantic-autoloads
scheme-autoloads sasl-autoloads ruby-modes-autoloads rmail-autoloads
reftex-autoloads python-modes-autoloads psgml-dtds-autoloads
psgml-autoloads ps-print-autoloads prog-modes-autoloads
perl-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads oo-browser-autoloads
net-utils-autoloads mule-ucs-autoloads mule-base-autoloads
mmm-mode-autoloads misc-games-autoloads mine-autoloads mh-e-autoloads
mew-autoloads mailcrypt-autoloads mail-lib-autoloads lookup-autoloads
locale-autoloads liece-autoloads leim-autoloads latin-unity-autoloads
jde-autoloads ispell-autoloads ilisp-autoloads igrep-autoloads
ibuffer-autoloads hm--html-menus-autoloads gnus-autoloads
gnats-autoloads games-autoloads fsf-compat-autoloads
frame-icon-autoloads forms-autoloads footnote-autoloads flim-autoloads
eudc-autoloads eterm-autoloads ess-autoloads eshell-autoloads
emerge-autoloads elib-autoloads eieio-autoloads efs-autoloads
edt-autoloads edit-utils-autoloads ediff-autoloads edebug-autoloads
ecrypto-autoloads ecb-autoloads docbookide-autoloads dired-autoloads
dictionary-autoloads debug-autoloads cookie-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads lisp-autoloads loadhist auto-show fontl-hooks
x-iso8859-1 slovenian czech romanian ccl mule-help code-cmds
gutter-items menubar-items x-menubar mode-motion mouse itimer
auto-save lisp-mode easymenu iso8859-1 page buff-menu lib-complete
cus-file derived frame text-props obsolete cus-start custom widget
cl-extra mini-cl cl cl-19 packages backquote very-early-lisp
file-coding mule lucid-scrollbars cut-buffer lucid-menubars
motif-dialogs x c-balloon-help tty-frames tty toolbar native-sound
scrollbar unix-processes multicast network-streams subprocesses
modules menu-accelerator-support menubar berkeley-db md5 xemacs xim
gutter tiff png gif jpeg xpm xbm lisp-float-type linux dialog devices
window-system base64)