summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 6eb43677408..9af2a9a9371 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -323,7 +323,13 @@ to NEW-FACE on frame NEW-FRAME."
(setq old-face (internal-get-face old-face frame))
(setq new-face (or (internal-find-face new-face new-frame)
(make-face new-face)))
- (set-face-font new-face (face-font old-face frame) new-frame)
+ (condition-case nil
+ ;; A face that has a global symbolic font modifier such as `bold'
+ ;; might legitimately get an error here.
+ ;; Use the frame's default font in that case.
+ (set-face-font new-face (face-font old-face frame) new-frame)
+ (error
+ (set-face-font new-face nil new-frame)))
(set-face-foreground new-face (face-foreground old-face frame) new-frame)
(set-face-background new-face (face-background old-face frame) new-frame)
;;; (set-face-background-pixmap