# HG changeset patch # User Richard M. Stallman # Date 1198433318 0 # Node ID c70a8429c7d8e977e5e577aabd5ef39d565c002e # Parent d5e68c18dbb99834c8676351ad22dd375d9ba014 (copy-face): Create the new face explicitly if it does not exist already. diff -r d5e68c18dbb9 -r c70a8429c7d8 lisp/faces.el --- a/lisp/faces.el Sun Dec 23 16:45:07 2007 +0000 +++ b/lisp/faces.el Sun Dec 23 18:08:38 2007 +0000 @@ -158,13 +158,18 @@ If the optional fourth argument NEW-FRAME is given, copy the information from face OLD-FACE on frame FRAME -to NEW-FACE on frame NEW-FRAME." +to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." (let ((inhibit-quit t)) (if (null frame) (progn + (when new-frame + (error "Copying face %s from all frames to one frame" + old-face)) + (make-empty-face new-face) (dolist (frame (frame-list)) (copy-face old-face new-face frame)) (copy-face old-face new-face t)) + (make-empty-face new-face) (internal-copy-lisp-face old-face new-face frame new-frame)) new-face))