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: Glenn Morris
Subject: Re: Change in face-spec-set
Date: Fri, 19 Oct 2007 17:12:46 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Glenn Morris wrote:

> Richard Stallman wrote:
>
>> I wrote the following patch to fix one of the bugs in `face-spec-set'
>> which was introduced by my first change there.  Other changes have
>> been made subsequently, and I don't know whether this patch is still
>> needed, or whether any problems remain there.  Can someone tell me
>> the situation?
>
> The only change to face-spec-set is mine, to set the default for new
> frames when FRAME is nil. If I apply your patch, this is once again
> broken.

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?


*** 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))))




reply via email to

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