From: Richard M. Stallman Date: Thu, 11 Aug 1994 07:11:51 +0000 (+0000) Subject: (copy-face): Ignore errors in set-face-font. X-Git-Tag: emacs-19.34~7338 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=52267b568dd193b37f0125a71acb7db94399d28a;p=emacs.git (copy-face): Ignore errors in set-face-font. --- 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