* Problem around custom-push-theme
@ 2005-09-09 5:33 Stefan Monnier
2005-09-10 0:34 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2005-09-09 5:33 UTC (permalink / raw)
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:
E.g. the following command:
src/emacs -q --no-site-file --eval "(progn (setq ott1 'o) (custom-set-faces '(ott1 nil)))"
leads to an error whose backtrace looks like:
Debugger entered--Lisp error: (error "Invalid face" ott1)
internal-get-lisp-face-attribute(ott1 :family nil)
face-attribute(ott1 :family nil)
custom-face-attributes-get(ott1 nil)
custom-push-theme(theme-face ott1 user set nil)
custom-theme-set-faces(user ...)
apply(custom-theme-set-faces user ...)
custom-set-faces(...)
-- Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem around custom-push-theme
2005-09-09 5:33 Problem around custom-push-theme Stefan Monnier
@ 2005-09-10 0:34 ` Chong Yidong
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2005-09-10 0:34 UTC (permalink / raw)
Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-10 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 5:33 Problem around custom-push-theme Stefan Monnier
2005-09-10 0:34 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.