mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
Handle calling defface on a face with existing theme settings (Bug#8454).
* lisp/cus-face.el (custom-declare-face): Call custom-theme-recalc-face if the face has existing theme settings.
This commit is contained in:
parent
2a86a00c4f
commit
027f966de4
@ -1,3 +1,8 @@
|
||||
2011-05-08 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* cus-face.el (custom-declare-face): Call custom-theme-recalc-face
|
||||
if the face has existing theme settings (Bug#8454).
|
||||
|
||||
2011-05-08 Ralph Schleicher <rs@ralph-schleicher.de>
|
||||
|
||||
* progmodes/perl-mode.el (perl-imenu-generic-expression): Only
|
||||
|
@ -34,7 +34,6 @@
|
||||
(defun custom-declare-face (face spec doc &rest args)
|
||||
"Like `defface', but FACE is evaluated as a normal argument."
|
||||
(unless (get face 'face-defface-spec)
|
||||
(when (fboundp 'facep)
|
||||
(unless (facep face)
|
||||
;; If the user has already created the face, respect that.
|
||||
(let ((value (or (get face 'saved-face) spec))
|
||||
@ -48,14 +47,17 @@
|
||||
(setq have-window-system t)))
|
||||
;; When making a face after frames already exist
|
||||
(if have-window-system
|
||||
(make-face-x-resource-internal face)))))
|
||||
(make-face-x-resource-internal face))))
|
||||
;; Don't record SPEC until we see it causes no errors.
|
||||
(put face 'face-defface-spec (purecopy spec))
|
||||
(push (cons 'defface face) current-load-list)
|
||||
(when (and doc (null (face-documentation face)))
|
||||
(set-face-documentation face (purecopy doc)))
|
||||
(custom-handle-all-keywords face args 'custom-face)
|
||||
(run-hooks 'custom-define-hook))
|
||||
(run-hooks 'custom-define-hook)
|
||||
;; If the face has an existing theme setting, recalculate it.
|
||||
(if (get face 'theme-face)
|
||||
(custom-theme-recalc-face face)))
|
||||
face)
|
||||
|
||||
;;; Face attributes.
|
||||
|
Loading…
Reference in New Issue
Block a user