emacs-devel
[Top][All Lists]
Advanced

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

Re: can't set both mode-line color and default frame font?


From: Richard Stallman
Subject: Re: can't set both mode-line color and default frame font?
Date: Sun, 16 Sep 2007 23:59:16 -0400

I think you are right in analyzing the bug this way:

    I think it comes down to this code in face-set-after-frame-default

        ;; Initialize faces from face specs and X resources.  The
        ;; condition-case prevents invalid specs from causing frame
        ;; creation to fail.
        (dolist (face (delq 'default (face-list)))
          (condition-case ()
              (progn
                (face-spec-set face (face-user-default-spec face) frame) ; (1)
                (if (memq (window-system frame) '(x w32 mac))
                    (make-face-x-resource-internal face frame))          ; (2)
                (internal-merge-in-global-face face frame))              ; (3)
            (error nil)))

The problem is that we have several ways to set face attributes,
and their order of priority is not always the same.  The code above
uses this priority order (highest priority to lowest):

* All-frames face attribute settings
* X resources.
* User face customizations
* The defface.

However, custom-theme-set-faces installs the user customization
over the X resources and the all-frames attribute settings.
That inconsistency causes this problem, and we should probably
make both cases consistent.

The order in face-set-after-frame-default seems most
correct, assuming X resources are set by the user.

However, that works out badly in practice when GNOME creates X
resources on its own.  THOSE X resources should have lower priority
than user face customizations.

Unfortunately, I don't see any way to distinguish settings made
by the GNOME settings demon from those made by the user.

I know that X stores resources in various places.  Perhaps
some of these places should have higher priority than others.

The file xrdb.c, which I have never really understood, seems
to try to merge X resources from various places.  Perhaps
that points a way to such a solution.

Would someone like to study xrdb.c and report on what is possible?




reply via email to

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