Mercurial > emacs
changeset 79615:c70a8429c7d8
(copy-face): Create the new face explicitly if it does not exist already.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 23 Dec 2007 18:08:38 +0000 |
parents | d5e68c18dbb9 |
children | 8a02ad9c570d |
files | lisp/faces.el |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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))