]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / faces.el
index 99285f9ad5343f9cf672b1c9f09cd9933a0e8b00..75fe47022a2e23d98b8f19973ebaacfd543d80cd 100644 (file)
@@ -228,13 +228,18 @@ and for each existing frame.
 
 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))