changeset 8515:3043fef029a7

(copy-face): Ignore errors in set-face-font.
author Richard M. Stallman <rms@gnu.org>
date Thu, 11 Aug 1994 07:11:51 +0000
parents 66866be86727
children 5d76d6decb35
files lisp/faces.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Thu Aug 11 03:47:40 1994 +0000
+++ b/lisp/faces.el	Thu Aug 11 07:11:51 1994 +0000
@@ -323,7 +323,13 @@
       (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