emacs-devel
[Top][All Lists]
Advanced

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

Re: Global Font Lock by default


From: Dan Nicolaescu
Subject: Re: Global Font Lock by default
Date: Wed, 02 Nov 2005 14:51:52 -0800

"Richard M. Stallman" <address@hidden> writes:

  >     later at run time face-spec-choose is called this will match: 
  >     "((class color) (min-colors 8) (background light))"
  >     but because it specifies no properties face-spec-set returns 
  >     nil => face-spec-reset-face is not called in face-spec-set => the bold
  >     and italic attributes are kept... 
  > 
  > That seems to be a bug in the general mechanism.
  > Any defface should have the same meaning, if preloaded,
  > as it would have if not preloaded.  In particular,
  > any fallback option which would not apply at run time
  > should not ultimately apply when preloaded.
  > 
  > Therefore, either (t (:weight bold :slant italic)) should not
  > be applied during preload, or it should be overridden at start-up.

I think that the patch below to face-spec-set  is the right thing to
do.  
FACE needs to be reset even whe `face-choose-set' returns nil, but 
according to the docstring it should not be reset if SPEC is nil. 


*** faces.el    01 Nov 2005 15:50:50 -0800      1.340
--- faces.el    02 Nov 2005 14:17:35 -0800      
***************
*** 1448,1454 ****
  do it on all frames.  See `defface' for information about SPEC.
  If SPEC is nil, do nothing."
    (let ((attrs (face-spec-choose spec frame)))
!     (when attrs
        (face-spec-reset-face face frame))
      (while attrs
        (let ((attribute (car attrs))
--- 1448,1454 ----
  do it on all frames.  See `defface' for information about SPEC.
  If SPEC is nil, do nothing."
    (let ((attrs (face-spec-choose spec frame)))
!     (when spec
        (face-spec-reset-face face frame))
      (while attrs
        (let ((attribute (car attrs))




reply via email to

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