emacs-devel
[Top][All Lists]
Advanced

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

Re: Change in face-spec-set


From: Johan Bockgård
Subject: Re: Change in face-spec-set
Date: Sun, 21 Oct 2007 01:47:10 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Glenn Morris <address@hidden> writes:

> Changing your patch to look like this seems better, if you think there
> is some problem in face-spec-reset-face. Is fixing
> face-spec-reset-face not an option?

The effect of face-spec-reset-face on the new-frame default for a face
is not to "set if from zero". It produces an entry like this in
`face-new-frame-defaults'

    (FACE . [face :ignore-defface :ignore-defface ...])

But we need `unspecified', not :ignore-defface. (`unspecified' means "no
global definition", whereas :ignore-defface means "the global definition
is `unspecified'").

(http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-10/msg00208.html)


> *** faces.el  18 Oct 2007 19:02:22 -0000      1.381
> --- faces.el  19 Oct 2007 21:11:31 -0000
> ***************
> *** 1449,1455 ****
>   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 (or frame t)))
>       (while attrs
>         (let ((attribute (car attrs))
>           (value (car (cdr attrs))))
> --- 1449,1462 ----
>   See `defface' for information about SPEC.  If SPEC is nil, do nothing."
>     (let ((attrs (face-spec-choose spec frame)))
>       (when spec
> !       (if frame
> !           (face-spec-reset-face face frame)
> !         ;; Clear all the new-frame defaults for this face.
> !         ;; face-spec-reset-face won't do it right.
> !         (let ((facevec (cdr (assq face face-new-frame-defaults))))
> !           (dotimes (i (length facevec))
> !             (unless (= i 0)
> !               (aset facevec i 'unspecified))))))
>       (while attrs
>         (let ((attribute (car attrs))
>           (value (car (cdr attrs))))

-- 
Johan Bockgård





reply via email to

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