>>>> "Daniel" == Daniel Pittman
<daniel(a)rimspace.net> writes:
Daniel> Setting the *default* face from Lisp using
Daniel> `set-face-property' causes this problem to show up. New
Daniel> frames suddenly don't quite work.
Right. Custom has a habit of clearing the default face, as well as
everything else.
Daniel> Earlier in the file, I also do (define-specifier-tag
Daniel> 'daniel).
Custom does not respect these, as far as I know; it simply trashes
anything it doesn't understand. The policy of the Custom maintainers
seems to be to wait until somebody complains, then add special-case
code to save the problematic data as part of Custom.
Daniel> Setting the default face from X resources seems to work
Daniel> correctly.
Nowadays Custom goes to some effort to save those. It used to trash
them, too.
I see Custom is still up to its old tricks. From lisp/faces.el
(comments in all caps are mine):
(defun startup-initialize-custom-faces ()
"Reset faces created by defface. Only called at startup.
Don't use this function in your program."
(when default-custom-frame-properties
;; Reset default value to the actual frame, not stream.
(setq default-custom-frame-properties
(extract-custom-frame-properties (selected-frame)))
;; like initialize-custom-faces but removes property first.
(mapc (lambda (symbol)
(let ((spec (or (get symbol 'saved-face)
(get symbol 'face-defface-spec))))
(when spec
;; Reset faces created during auto-autoloads loading.
(reset-face symbol) ;; <--- YOU LOSE LOSE LOSE
;; And set it according to the spec.
;; NOTE THAT THE SPEC IS CUSTOM INTERNAL DATA.
;; CALLING FACE MANIPULATION FUNCTIONS DIRECTLY (EG,
;; IN .emacs) DOES NOT UPDATE IT.
(face-display-set symbol spec nil))))
(face-list))))
If this is called early enough in the startup sequence it is probably
OK. I offer it as a typical example of the cavalier way that Custom
insists on resetting faces whenever it does any manipulations.
One thing you can try is to make sure that any Custom stuff is called
_before_ you do your own face manipulations. However, it used to be
the case that many Custom bugs of this nature would be invoked simply
by changing the default face from the menu.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."