diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-11-24 18:58:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-11-24 18:58:35 +0000 |
commit | b5188bcde8280375a922492f04a472ebeb4aa466 (patch) | |
tree | 16bd3a4b208819c7e68858fb3e226e03b44bfd91 /lisp/cus-face.el | |
parent | 718402b21a50030f996998cbb9e2e24dc3fd1de5 (diff) | |
download | emacs-b5188bcde8280375a922492f04a472ebeb4aa466.tar.gz |
(custom-declare-face): Add face-defface-spec prop after applying the
face spec.
Diffstat (limited to 'lisp/cus-face.el')
-rw-r--r-- | lisp/cus-face.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/cus-face.el b/lisp/cus-face.el index 2f4e91a900a..f6b00ed17b1 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -37,7 +37,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) - (put face 'face-defface-spec spec) (when (fboundp 'facep) (unless (facep face) ;; If the user has already created the face, respect that. @@ -46,7 +45,7 @@ frame) ;; Create global face. (make-empty-face face) - ;; Create frame local faces + ;; Create frame-local faces (while frames (setq frame (car frames) frames (cdr frames)) @@ -54,6 +53,8 @@ ;; When making a face after frames already exist (if (memq window-system '(x w32)) (make-face-x-resource-internal face)))) + ;; Don't record SPEC until we see it causes no errors. + (put face 'face-defface-spec spec) (when (and doc (null (face-documentation face))) (set-face-documentation face (purecopy doc))) (custom-handle-all-keywords face args 'custom-face) |