[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem around custom-push-theme
From: |
Chong Yidong |
Subject: |
Re: Problem around custom-push-theme |
Date: |
Fri, 09 Sep 2005 20:34:36 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> If a variable is set and we try to define a (not yet existing) face of the
> same name with custom-set-face, it seems that custom-push-theme gets
> confused and infers from boundp that the symbol is a valid face:
Does this fix it?
*** emacs/lisp/custom.el.~1.102.~ 2005-09-05 23:09:03.000000000 -0400
--- emacs/lisp/custom.el 2005-09-09 20:30:01.000000000 -0400
***************
*** 649,665 ****
(progn
(setcar (cdr setting) mode)
(setcar (cddr setting) value))
! (if (and (null old)
! (boundp symbol))
! (setq old
! (list
! (list 'standard 'set
! (if (eq prop 'theme-value)
! (symbol-value symbol)
! (list
! (append
! '(t)
! (custom-face-attributes-get symbol nil))))))))
(put symbol prop (cons (list theme mode value) old)))
;; Record, for each theme, all its settings.
(put theme 'theme-settings
--- 649,664 ----
(progn
(setcar (cdr setting) mode)
(setcar (cddr setting) value))
! ;; If no custom theme has been applied yet, first save the
! ;; current values to the 'standard theme.
! (if (null old)
! (if (and (eq prop 'theme-value)
! (boundp symbol))
! (setq old
! (list (list 'standard 'set (symbol-value symbol))))
! (if (facep symbol)
! (setq old (list (list 'standard 'set (list
! (append '(t) (custom-face-attributes-get symbol nil)))))))))
(put symbol prop (cons (list theme mode value) old)))
;; Record, for each theme, all its settings.
(put theme 'theme-settings