diff options
| -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 @@ | |||
| 37 | (defun custom-declare-face (face spec doc &rest args) | 37 | (defun custom-declare-face (face spec doc &rest args) |
| 38 | "Like `defface', but FACE is evaluated as a normal argument." | 38 | "Like `defface', but FACE is evaluated as a normal argument." |
| 39 | (unless (get face 'face-defface-spec) | 39 | (unless (get face 'face-defface-spec) |
| 40 | (put face 'face-defface-spec spec) | ||
| 41 | (when (fboundp 'facep) | 40 | (when (fboundp 'facep) |
| 42 | (unless (facep face) | 41 | (unless (facep face) |
| 43 | ;; If the user has already created the face, respect that. | 42 | ;; If the user has already created the face, respect that. |
| @@ -46,7 +45,7 @@ | |||
| 46 | frame) | 45 | frame) |
| 47 | ;; Create global face. | 46 | ;; Create global face. |
| 48 | (make-empty-face face) | 47 | (make-empty-face face) |
| 49 | ;; Create frame local faces | 48 | ;; Create frame-local faces |
| 50 | (while frames | 49 | (while frames |
| 51 | (setq frame (car frames) | 50 | (setq frame (car frames) |
| 52 | frames (cdr frames)) | 51 | frames (cdr frames)) |
| @@ -54,6 +53,8 @@ | |||
| 54 | ;; When making a face after frames already exist | 53 | ;; When making a face after frames already exist |
| 55 | (if (memq window-system '(x w32)) | 54 | (if (memq window-system '(x w32)) |
| 56 | (make-face-x-resource-internal face)))) | 55 | (make-face-x-resource-internal face)))) |
| 56 | ;; Don't record SPEC until we see it causes no errors. | ||
| 57 | (put face 'face-defface-spec spec) | ||
| 57 | (when (and doc (null (face-documentation face))) | 58 | (when (and doc (null (face-documentation face))) |
| 58 | (set-face-documentation face (purecopy doc))) | 59 | (set-face-documentation face (purecopy doc))) |
| 59 | (custom-handle-all-keywords face args 'custom-face) | 60 | (custom-handle-all-keywords face args 'custom-face) |