summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-08-11 07:11:51 +0000
committerRichard M. Stallman <rms@gnu.org>1994-08-11 07:11:51 +0000
commit0d6ad481da0220953ac2c65d35923096c827d56a (patch)
tree29efa4be7543f134fd0e1da87bca4dcac6ca5bc6
parentf4b160d9fbe5b978b06f246da912470519739e42 (diff)
downloademacs-0d6ad481da0220953ac2c65d35923096c827d56a.tar.gz
(copy-face): Ignore errors in set-face-font.
-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