From 341a1bfb331089c1a78dfde7ed139918bb2880f0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 23 Dec 2007 18:09:10 +0000 Subject: [PATCH] (copy-face): Create the new face explicitly if it does not exist already. --- lisp/ChangeLog | 5 +++++ lisp/faces.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5742f97e50..f9fc2226269 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-23 Richard Stallman + + * faces.el (copy-face): Create the new face explicitly if it + does not exist already. + 2007-12-23 Andreas Schwab * files.el (switch-to-buffer-other-frame): Return the buffer diff --git a/lisp/faces.el b/lisp/faces.el index ceadb6f764f..a1b069e9ba6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -158,13 +158,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)) -- 2.39.2